public function optionsQueryData(& $options) {
		// column prefix
		if (empty($options['column_prefix'])) {
			$options['column_prefix'] = $this->column_prefix;
		}
		// handle pk
		if (!array_key_exists('pk', $options)) {
			$options['pk'] = $this->pk;
		}
		$pk = $options['pk'];
		// inject tenant
		if ($this->tenant && !isset($options['where'][$this->tenant_column])) {
			$options['where'][$this->tenant_column] = \Tenant::id();
		}
		// if compound key
		if (count($pk) > 1) {
			$temp = $pk;
			$last = array_pop($temp);
			foreach ($temp as $v) {
				if (empty($options['where'][$v])) {
					return [];
				}
			}
		}
		$data = $this->get($options);
		// merge acl returned from get
		if (!empty($this->acl_get_options)) {
			$options = $this->acl_get_options;
		}
		// if compound key
		if (!empty($temp)) {
			foreach ($temp as $v) {
				// if pk is array
				if (!empty($options['where'][$v]) && is_array($options['where'][$v])) {
					$result = [];
					foreach ($options['where'][$v] as $v2) {
						if (isset($data[$v2])) {
							$result = array_merge_hard($result, $data[$v2]);
						}
					}
					$data = $result;
				} else { // regular pk
					if (!isset($data[$options['where'][$v]])) {
						return [];
					}
					$data = $data[$options['where'][$v]];
				}
			}
		}
		return $data;
	}
public function optionsQueryData(& $options) {
		// column prefix
		if (empty($options['column_prefix'])) {
			$options['column_prefix'] = $this->column_prefix;
		}
		// handle pk
		if (!array_key_exists('pk', $options)) {
			$options['pk'] = $this->pk;
		}
		$pk = $options['pk'];
		// inject tenant
		if ($this->tenant && !isset($options['where'][$this->tenant_column])) {
			$options['where'][$this->tenant_column] = \Tenant::id();
		}
		// if compound key
		if (count($pk) > 1) {
			$temp = $pk;
			$last = array_pop($temp);
			foreach ($temp as $v) {
				if (empty($options['where'][$v])) {
					return [];
				}
			}
		}
		$data = $this->get($options);
		// merge acl returned from get
		if (!empty($this->acl_get_options)) {
			$options = $this->acl_get_options;
		}
		// if compound key
		if (!empty($temp)) {
			foreach ($temp as $v) {
				// if pk is array
				if (!empty($options['where'][$v]) && is_array($options['where'][$v])) {
					$result = [];
					foreach ($options['where'][$v] as $v2) {
						if (isset($data[$v2])) {
							$result = array_merge_hard($result, $data[$v2]);
						}
					}
					$data = $result;
				} else { // regular pk
					if (!isset($data[$options['where'][$v]])) {
						return [];
					}
					$data = $data[$options['where'][$v]];
				}
			}
		}
		return $data;
	}
public function optionsQueryData ( & $ options ) { // column prefix if ( empty ( $ options [ 'column_prefix' ] ) ) { $ options [ 'column_prefix' ] = $ this -> column_prefix ; } // handle pk if ( ! array_key_exists ( 'pk' , $ options ) ) { $ options [ 'pk' ] = $ this -> pk ; } $ pk = $ options [ 'pk' ] ; // inject tenant if ( $ this -> tenant && ! isset ( $ options [ 'where' ] [ $ this -> tenant_column ] ) ) { $ options [ 'where' ] [ $ this -> tenant_column ] = \ Tenant :: id ( ) ; } // if compound key if ( count ( $ pk ) > 1 ) { $ temp = $ pk ; $ last = array_pop ( $ temp ) ; foreach ( $ temp as $ v ) { if ( empty ( $ options [ 'where' ] [ $ v ] ) ) { return [ ] ; } } } $ data = $ this -> get ( $ options ) ; // merge acl returned from get if ( ! empty ( $ this -> acl_get_options ) ) { $ options = $ this -> acl_get_options ; } // if compound key if ( ! empty ( $ temp ) ) { foreach ( $ temp as $ v ) { // if pk is array if ( ! empty ( $ options [ 'where' ] [ $ v ] ) && is_array ( $ options [ 'where' ] [ $ v ] ) ) { $ result = [ ] ; foreach ( $ options [ 'where' ] [ $ v ] as $ v2 ) { if ( isset ( $ data [ $ v2 ] ) ) { $ result = array_merge_hard ( $ result , $ data [ $ v2 ] ) ; } } $ data = $ result ; } else { // regular pk if ( ! isset ( $ data [ $ options [ 'where' ] [ $ v ] ] ) ) { return [ ] ; } $ data = $ data [ $ options [ 'where' ] [ $ v ] ] ; } } } return $ data ; }
Query data for options

@param array $options
@return array
Query data for options