Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / themes / contrib / bootstrap / src / Plugin / Setting / SettingBase.php
index 2908eae826153048812cf276674aafaaac4d9098..d8f85c0382f131ae4a192b5430fffcda6cae3967 100644 (file)
@@ -1,8 +1,4 @@
 <?php
-/**
- * @file
- * Contains \Drupal\bootstrap\Plugin\Setting\SettingBase.
- */
 
 namespace Drupal\bootstrap\Plugin\Setting;
 
@@ -55,15 +51,23 @@ class SettingBase extends PluginBase implements SettingInterface {
    */
   public function getElementProperties() {
     $properties = $this->getPluginDefinition();
+    $ignore_keys = [
+      'class',
+      'defaultValue',
+      'definition',
+      'groups',
+      'id',
+      'provider',
+      'see',
+    ];
     foreach ($properties as $name => $value) {
-      if (in_array($name, ['class', 'defaultValue', 'definition', 'groups', 'id', 'provider', 'see'])) {
+      if (in_array($name, $ignore_keys)) {
         unset($properties[$name]);
       }
     }
     return $properties;
   }
 
-
   /**
    * {@inheritdoc}
    */
@@ -176,6 +180,7 @@ class SettingBase extends PluginBase implements SettingInterface {
     }
     return $group->$plugin_id;
   }
+
   /**
    * {@inheritdoc}
    */