fieldSettingsToHash() public method

This is the default implementation, which just returns the given $fieldSettings, assuming they are already in a hash format. Overwrite this in your specific implementation, if necessary.
public fieldSettingsToHash ( mixed $fieldSettings ) : array | hash | scalar | null
$fieldSettings mixed
return array | hash | scalar | null
Esempio n. 1
0
 /**
  * Converts the given $fieldSettings to a simple hash format.
  *
  * @param mixed $fieldSettings
  *
  * @return array|hash|scalar|null
  */
 public function fieldSettingsToHash($fieldSettings)
 {
     return $this->internalFieldType->fieldSettingsToHash($fieldSettings);
 }
Esempio n. 2
0
 /**
  * Converts the given $fieldSettings to a simple hash format
  *
  * This is the default implementation, which just returns the given
  * $fieldSettings, assuming they are already in a hash format. Overwrite
  * this in your specific implementation, if necessary.
  *
  * @param mixed $fieldSettings
  *
  * @return array|hash|scalar|null
  */
 public function fieldSettingsToHash($fieldSettings)
 {
     $fieldSettingsHash = parent::fieldSettingsToHash($fieldSettings);
     if (isset($fieldSettingsHash['dateInterval'])) {
         $fieldSettingsHash['dateInterval'] = $fieldSettingsHash['dateInterval']->format('P%r%yY%r%mM%r%dDT%r%hH%iM%r%sS');
     }
     return $fieldSettingsHash;
 }