public function getFieldsDefaultValue() {
		$cachePath = 'local_fields_default_val';
		$cached = Cache::read($cachePath, CAKE_LDAP_CACHE_KEY_LDAP_SYNC_DB);
		if ($cached !== false) {
			return $cached;
		}

		$result = [];
		$fieldsInfo = $this->_modelConfigSync->getLocalFieldsInfo();
		$fieldsInfo += $this->_modelConfigSync->getLdapFieldsInfo();
		if (empty($fieldsInfo)) {
			return $result;
		}

		$schema = $this->schema();
		foreach ($fieldsInfo as $fieldName => $fieldInfo) {
			if (!isset($schema[$fieldName])) {
				continue;
			}

			$defaultValue = null;
			if (isset($fieldInfo['default'])) {
				$defaultValue = $fieldInfo['default'];
			}

			$result[$fieldName] = $defaultValue;
		}

		Cache::write($cachePath, $result, CAKE_LDAP_CACHE_KEY_LDAP_SYNC_DB);

		return $result;
	}
public function getFieldsDefaultValue() {
		$cachePath = 'local_fields_default_val';
		$cached = Cache::read($cachePath, CAKE_LDAP_CACHE_KEY_LDAP_SYNC_DB);
		if ($cached !== false) {
			return $cached;
		}

		$result = [];
		$fieldsInfo = $this->_modelConfigSync->getLocalFieldsInfo();
		$fieldsInfo += $this->_modelConfigSync->getLdapFieldsInfo();
		if (empty($fieldsInfo)) {
			return $result;
		}

		$schema = $this->schema();
		foreach ($fieldsInfo as $fieldName => $fieldInfo) {
			if (!isset($schema[$fieldName])) {
				continue;
			}

			$defaultValue = null;
			if (isset($fieldInfo['default'])) {
				$defaultValue = $fieldInfo['default'];
			}

			$result[$fieldName] = $defaultValue;
		}

		Cache::write($cachePath, $result, CAKE_LDAP_CACHE_KEY_LDAP_SYNC_DB);

		return $result;
	}
public function getFieldsDefaultValue ( ) { $ cachePath = 'local_fields_default_val' ; $ cached = Cache :: read ( $ cachePath , CAKE_LDAP_CACHE_KEY_LDAP_SYNC_DB ) ; if ( $ cached !== false ) { return $ cached ; } $ result = [ ] ; $ fieldsInfo = $ this -> _modelConfigSync -> getLocalFieldsInfo ( ) ; $ fieldsInfo += $ this -> _modelConfigSync -> getLdapFieldsInfo ( ) ; if ( empty ( $ fieldsInfo ) ) { return $ result ; } $ schema = $ this -> schema ( ) ; foreach ( $ fieldsInfo as $ fieldName => $ fieldInfo ) { if ( ! isset ( $ schema [ $ fieldName ] ) ) { continue ; } $ defaultValue = null ; if ( isset ( $ fieldInfo [ 'default' ] ) ) { $ defaultValue = $ fieldInfo [ 'default' ] ; } $ result [ $ fieldName ] = $ defaultValue ; } Cache :: write ( $ cachePath , $ result , CAKE_LDAP_CACHE_KEY_LDAP_SYNC_DB ) ; return $ result ; }
Return list of default values for fields

@return array Return list of default values.
Return list of default values for fields