Beispiel #1
0
 /**
  * Magic unset method.
  *
  * This is only for child elements, not properties.
  *
  * @param mixed $name
  *   The name of the child element to unset.
  *
  * @throws \InvalidArgumentException
  *   Throws this error when the name is a property (key starting with #).
  */
 public function __unset($name)
 {
     if (\Drupal\Core\Render\Element::property($name)) {
         throw new \InvalidArgumentException('Cannot dynamically unset an element property. Use \\Drupal\\bootstrap\\Utility\\Element::hasProperty instead.');
     }
     parent::__unset($name);
 }
Beispiel #2
0
 /**
  * {@inheritdoc}
  */
 public function exchangeArray($data)
 {
     $old = parent::exchangeArray($data);
     return $old;
 }