function public function SettingBase::getElementProperties

8.x-3.x SettingBase.php public SettingBase::getElementProperties()

Retrieves all the form properties from the setting definition.

Return value

array The form properties.

Class

SettingBase
Base class for a setting.

Namespace

Drupal\bootstrap\Plugin\Setting

Source src/Plugin/Setting/SettingBase.php (line 74)

public function getElementProperties() {
  $properties = $this->getPluginDefinition();
  $ignore_keys = [
    'class',
    'defaultValue',
    'definition',
    'groups',
    'id',
    'provider',
    'see',
  ];
  foreach ($properties as $name => $value) {
    if (in_array($name, $ignore_keys)) {
      unset($properties[$name]);
    }
  }
  return $properties;
}