public FieldStorageConfig::getSetting($setting_name)
Returns the value of a given storage setting.
Parameters
string $setting_name: The setting name.
Return value
mixed The setting value.
Overrides FieldStorageDefinitionInterface::getSetting
File
- core/modules/field/src/Entity/FieldStorageConfig.php, line 550
Class
- FieldStorageConfig
- Defines the Field storage configuration entity.
Namespace
Drupal\field\Entity
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | public function getSetting( $setting_name ) { // @todo See getSettings() about potentially statically caching this. // We assume here that one call to array_key_exists() is more efficient // than calling getSettings() when all we need is a single setting. if ( array_key_exists ( $setting_name , $this ->settings)) { return $this ->settings[ $setting_name ]; } $settings = $this ->getSettings(); if ( array_key_exists ( $setting_name , $settings )) { return $settings [ $setting_name ]; } else { return NULL; } } |
Please login to continue.