public function getFilterOptions() {
		$language = (string)Configure::read('Config.language');
		$cachePath = 'local_fields_filter_opt_' . $language;
		$cached = Cache::read($cachePath, CAKE_LDAP_CACHE_KEY_LDAP_SYNC_DB);
		if ($cached !== false) {
			return $cached;
		}

		$result = [];
		$excludeFields = [
			'id',
			'department_id',
			'manager_id',
			'lft',
			'rght',
			CAKE_LDAP_LDAP_ATTRIBUTE_OBJECT_GUID,
			CAKE_LDAP_LDAP_ATTRIBUTE_DISTINGUISHED_NAME,
		];
		$excludeFieldsLabel = [
			$this->alias . '.' . CAKE_LDAP_LDAP_ATTRIBUTE_OBJECT_GUID,
			$this->alias . '.' . CAKE_LDAP_LDAP_ATTRIBUTE_DISTINGUISHED_NAME,
		];

		$fieldsInfo = $this->_modelConfigSync->getLocalFieldsInfo();
		$fieldsInfo += $this->_modelConfigSync->getLdapFieldsInfo();
		$fieldsInfo = array_diff_key($fieldsInfo, array_flip($excludeFields));
		$fieldsLabels = $this->_getLabelForFields($fieldsInfo, true);
		foreach ($fieldsLabels as $fieldName => $label) {
			$fieldOptions = [];
			if (!empty($label)) {
				$fieldOptions['label'] = $label;
			}
			if ($this->_isHashPath($fieldName)) {
				$fieldOptions['disabled'] = true;
			}
			$result[$fieldName] = $fieldOptions;
		}
		Cache::write($cachePath, $result, CAKE_LDAP_CACHE_KEY_LDAP_SYNC_DB);

		return $result;
	}
public function getFilterOptions() {
		$language = (string)Configure::read('Config.language');
		$cachePath = 'local_fields_filter_opt_' . $language;
		$cached = Cache::read($cachePath, CAKE_LDAP_CACHE_KEY_LDAP_SYNC_DB);
		if ($cached !== false) {
			return $cached;
		}

		$result = [];
		$excludeFields = [
			'id',
			'department_id',
			'manager_id',
			'lft',
			'rght',
			CAKE_LDAP_LDAP_ATTRIBUTE_OBJECT_GUID,
			CAKE_LDAP_LDAP_ATTRIBUTE_DISTINGUISHED_NAME,
		];
		$excludeFieldsLabel = [
			$this->alias . '.' . CAKE_LDAP_LDAP_ATTRIBUTE_OBJECT_GUID,
			$this->alias . '.' . CAKE_LDAP_LDAP_ATTRIBUTE_DISTINGUISHED_NAME,
		];

		$fieldsInfo = $this->_modelConfigSync->getLocalFieldsInfo();
		$fieldsInfo += $this->_modelConfigSync->getLdapFieldsInfo();
		$fieldsInfo = array_diff_key($fieldsInfo, array_flip($excludeFields));
		$fieldsLabels = $this->_getLabelForFields($fieldsInfo, true);
		foreach ($fieldsLabels as $fieldName => $label) {
			$fieldOptions = [];
			if (!empty($label)) {
				$fieldOptions['label'] = $label;
			}
			if ($this->_isHashPath($fieldName)) {
				$fieldOptions['disabled'] = true;
			}
			$result[$fieldName] = $fieldOptions;
		}
		Cache::write($cachePath, $result, CAKE_LDAP_CACHE_KEY_LDAP_SYNC_DB);

		return $result;
	}
public function getFilterOptions ( ) { $ language = ( string ) Configure :: read ( 'Config.language' ) ; $ cachePath = 'local_fields_filter_opt_' . $ language ; $ cached = Cache :: read ( $ cachePath , CAKE_LDAP_CACHE_KEY_LDAP_SYNC_DB ) ; if ( $ cached !== false ) { return $ cached ; } $ result = [ ] ; $ excludeFields = [ 'id' , 'department_id' , 'manager_id' , 'lft' , 'rght' , CAKE_LDAP_LDAP_ATTRIBUTE_OBJECT_GUID , CAKE_LDAP_LDAP_ATTRIBUTE_DISTINGUISHED_NAME , ] ; $ excludeFieldsLabel = [ $ this -> alias . '.' . CAKE_LDAP_LDAP_ATTRIBUTE_OBJECT_GUID , $ this -> alias . '.' . CAKE_LDAP_LDAP_ATTRIBUTE_DISTINGUISHED_NAME , ] ; $ fieldsInfo = $ this -> _modelConfigSync -> getLocalFieldsInfo ( ) ; $ fieldsInfo += $ this -> _modelConfigSync -> getLdapFieldsInfo ( ) ; $ fieldsInfo = array_diff_key ( $ fieldsInfo , array_flip ( $ excludeFields ) ) ; $ fieldsLabels = $ this -> _getLabelForFields ( $ fieldsInfo , true ) ; foreach ( $ fieldsLabels as $ fieldName => $ label ) { $ fieldOptions = [ ] ; if ( ! empty ( $ label ) ) { $ fieldOptions [ 'label' ] = $ label ; } if ( $ this -> _isHashPath ( $ fieldName ) ) { $ fieldOptions [ 'disabled' ] = true ; } $ result [ $ fieldName ] = $ fieldOptions ; } Cache :: write ( $ cachePath , $ result , CAKE_LDAP_CACHE_KEY_LDAP_SYNC_DB ) ; return $ result ; }
Return options for Filter component

@return array Return array options for Filter component.
Return options for Filter component