public Attribute::toArray()
Returns all storage elements as an array.
array An associative array of attributes.
public function toArray() { $return = []; foreach ($this->storage as $name => $value) { $return[$name] = $value->value(); } return $return; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Template!Attribute.php/function/Attribute::toArray/8.1.x