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

		$localFieldsConfig = [
			'id' => [
				'label' => null,
				'altLabel' => null,
				'priority' => 0,
				'rules' => [
					'naturalNumber' => [
						'rule' => ['naturalNumber'],
						'message' => 'Incorrect primary key',
						'allowEmpty' => false,
						'required' => true,
						'last' => true,
						'on' => 'update'
					],
				],
				'default' => null
			],
			'department_id' => [
				'label' => null,
				'altLabel' => null,
				'priority' => 0,
				'rules' => [
					'naturalNumber' => [
						'rule' => ['naturalNumber'],
						'message' => 'Incorrect foreign key',
						'allowEmpty' => true,
						'required' => true,
						'last' => true,
					],
				],
				'default' => null
			],
			'manager_id' => [
				'label' => null,
				'altLabel' => null,
				'priority' => 0,
				'rules' => [
					'naturalNumber' => [
						'rule' => ['naturalNumber'],
						'message' => 'Incorrect foreign key',
						'allowEmpty' => true,
						'required' => false,
						'last' => true,
					],
				],
				'default' => null
			],
			'block' => [
				'label' => __d('cake_ldap_field_name', 'Block'),
				'altLabel' => __d('cake_ldap_field_name', 'Block'),
				'priority' => 100,
				'rules' => [
					'boolean' => [
						'rule' => ['boolean'],
						'message' => 'Incorrect state of blocking',
						'allowEmpty' => true,
						'required' => false,
						'last' => false,
					],
				],
				'default' => false
			],
		];

		$localFieldsList = [
			'id',
		];
		$ldapFieldsList = $this->_getListBindFields();
		$ldapFieldsConfig = $this->getLdapFieldsInfo();
		foreach ($ldapFieldsList as $ldapFieldName => $localFieldName) {
			if (isset($ldapFieldsConfig[$ldapFieldName]) && !empty($localFieldName)) {
				$localFieldsList[] = $localFieldName;
			}
		}
		if (!$this->getFlagDeleteEmployees()) {
			$localFieldsList[] = 'block';
		}

		$result = array_intersect_key($localFieldsConfig, array_flip($localFieldsList));
		Cache::write($cachePath, $result, CAKE_LDAP_CACHE_KEY_CONFIG);

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

		$localFieldsConfig = [
			'id' => [
				'label' => null,
				'altLabel' => null,
				'priority' => 0,
				'rules' => [
					'naturalNumber' => [
						'rule' => ['naturalNumber'],
						'message' => 'Incorrect primary key',
						'allowEmpty' => false,
						'required' => true,
						'last' => true,
						'on' => 'update'
					],
				],
				'default' => null
			],
			'department_id' => [
				'label' => null,
				'altLabel' => null,
				'priority' => 0,
				'rules' => [
					'naturalNumber' => [
						'rule' => ['naturalNumber'],
						'message' => 'Incorrect foreign key',
						'allowEmpty' => true,
						'required' => true,
						'last' => true,
					],
				],
				'default' => null
			],
			'manager_id' => [
				'label' => null,
				'altLabel' => null,
				'priority' => 0,
				'rules' => [
					'naturalNumber' => [
						'rule' => ['naturalNumber'],
						'message' => 'Incorrect foreign key',
						'allowEmpty' => true,
						'required' => false,
						'last' => true,
					],
				],
				'default' => null
			],
			'block' => [
				'label' => __d('cake_ldap_field_name', 'Block'),
				'altLabel' => __d('cake_ldap_field_name', 'Block'),
				'priority' => 100,
				'rules' => [
					'boolean' => [
						'rule' => ['boolean'],
						'message' => 'Incorrect state of blocking',
						'allowEmpty' => true,
						'required' => false,
						'last' => false,
					],
				],
				'default' => false
			],
		];

		$localFieldsList = [
			'id',
		];
		$ldapFieldsList = $this->_getListBindFields();
		$ldapFieldsConfig = $this->getLdapFieldsInfo();
		foreach ($ldapFieldsList as $ldapFieldName => $localFieldName) {
			if (isset($ldapFieldsConfig[$ldapFieldName]) && !empty($localFieldName)) {
				$localFieldsList[] = $localFieldName;
			}
		}
		if (!$this->getFlagDeleteEmployees()) {
			$localFieldsList[] = 'block';
		}

		$result = array_intersect_key($localFieldsConfig, array_flip($localFieldsList));
		Cache::write($cachePath, $result, CAKE_LDAP_CACHE_KEY_CONFIG);

		return $result;
	}
public function getLocalFieldsInfo ( ) { $ language = ( string ) Configure :: read ( 'Config.language' ) ; $ cachePath = 'local_fields_info_' . $ language ; $ cached = Cache :: read ( $ cachePath , CAKE_LDAP_CACHE_KEY_CONFIG ) ; if ( $ cached !== false ) { return $ cached ; } $ localFieldsConfig = [ 'id' => [ 'label' => null , 'altLabel' => null , 'priority' => 0 , 'rules' => [ 'naturalNumber' => [ 'rule' => [ 'naturalNumber' ] , 'message' => 'Incorrect primary key' , 'allowEmpty' => false , 'required' => true , 'last' => true , 'on' => 'update' ] , ] , 'default' => null ] , 'department_id' => [ 'label' => null , 'altLabel' => null , 'priority' => 0 , 'rules' => [ 'naturalNumber' => [ 'rule' => [ 'naturalNumber' ] , 'message' => 'Incorrect foreign key' , 'allowEmpty' => true , 'required' => true , 'last' => true , ] , ] , 'default' => null ] , 'manager_id' => [ 'label' => null , 'altLabel' => null , 'priority' => 0 , 'rules' => [ 'naturalNumber' => [ 'rule' => [ 'naturalNumber' ] , 'message' => 'Incorrect foreign key' , 'allowEmpty' => true , 'required' => false , 'last' => true , ] , ] , 'default' => null ] , 'block' => [ 'label' => __d ( 'cake_ldap_field_name' , 'Block' ) , 'altLabel' => __d ( 'cake_ldap_field_name' , 'Block' ) , 'priority' => 100 , 'rules' => [ 'boolean' => [ 'rule' => [ 'boolean' ] , 'message' => 'Incorrect state of blocking' , 'allowEmpty' => true , 'required' => false , 'last' => false , ] , ] , 'default' => false ] , ] ; $ localFieldsList = [ 'id' , ] ; $ ldapFieldsList = $ this -> _getListBindFields ( ) ; $ ldapFieldsConfig = $ this -> getLdapFieldsInfo ( ) ; foreach ( $ ldapFieldsList as $ ldapFieldName => $ localFieldName ) { if ( isset ( $ ldapFieldsConfig [ $ ldapFieldName ] ) && ! empty ( $ localFieldName ) ) { $ localFieldsList [ ] = $ localFieldName ; } } if ( ! $ this -> getFlagDeleteEmployees ( ) ) { $ localFieldsList [ ] = 'block' ; } $ result = array_intersect_key ( $ localFieldsConfig , array_flip ( $ localFieldsList ) ) ; Cache :: write ( $ cachePath , $ result , CAKE_LDAP_CACHE_KEY_CONFIG ) ; return $ result ; }
Return informations about local fields of table `employees`

@return array Informations about local fields
Return informations about local fields of table employees