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

		$result = [];
		$data = (array)$this->getConfig('LdapSync.LdapFields');
		if (empty($data)) {
			return $result;
		}

		$modelEmployeeLdap = ClassRegistry::init('CakeLdap.EmployeeLdap');
		$schema = $modelEmployeeLdap->schema();
		if (empty($schema)) {
			$schema = [];
		}
		$requiredFields = $modelEmployeeLdap->getRequiredFields();
		$data += array_flip($requiredFields);
		$result = array_intersect_key($data, $schema);
		Cache::write($cachePath, $result, CAKE_LDAP_CACHE_KEY_CONFIG);

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

		$result = [];
		$data = (array)$this->getConfig('LdapSync.LdapFields');
		if (empty($data)) {
			return $result;
		}

		$modelEmployeeLdap = ClassRegistry::init('CakeLdap.EmployeeLdap');
		$schema = $modelEmployeeLdap->schema();
		if (empty($schema)) {
			$schema = [];
		}
		$requiredFields = $modelEmployeeLdap->getRequiredFields();
		$data += array_flip($requiredFields);
		$result = array_intersect_key($data, $schema);
		Cache::write($cachePath, $result, CAKE_LDAP_CACHE_KEY_CONFIG);

		return $result;
	}
public function getLdapFieldsInfo ( ) { $ language = ( string ) Configure :: read ( 'Config.language' ) ; $ cachePath = 'ldap_fields_info_' . $ language ; $ cached = Cache :: read ( $ cachePath , CAKE_LDAP_CACHE_KEY_CONFIG ) ; if ( $ cached !== false ) { return $ cached ; } $ result = [ ] ; $ data = ( array ) $ this -> getConfig ( 'LdapSync.LdapFields' ) ; if ( empty ( $ data ) ) { return $ result ; } $ modelEmployeeLdap = ClassRegistry :: init ( 'CakeLdap.EmployeeLdap' ) ; $ schema = $ modelEmployeeLdap -> schema ( ) ; if ( empty ( $ schema ) ) { $ schema = [ ] ; } $ requiredFields = $ modelEmployeeLdap -> getRequiredFields ( ) ; $ data += array_flip ( $ requiredFields ) ; $ result = array_intersect_key ( $ data , $ schema ) ; Cache :: write ( $ cachePath , $ result , CAKE_LDAP_CACHE_KEY_CONFIG ) ; return $ result ; }
Returns information about the local fields of table `employees`
based on the `LdapFields` configuration from the plugin configuration file

@return array Informations about local fields
Returns information about the local fields of table employees based on the LdapFields configuration from the plugin configuration file