You are here

public function Element::map in Express 8

Maps an element's properties to its attributes array.

Parameters

array $map: An associative array whose keys are element property names and whose values are the HTML attribute names to set on the corresponding property; e.g., array('#propertyname' => 'attributename'). If both names are identical except for the leading '#', then an attribute name value is sufficient and no property name needs to be specified.

Return value

$this

File

themes/contrib/bootstrap/src/Utility/Element.php, line 490
Contains \Drupal\bootstrap\Utility\Element.

Class

Element
Provides helper methods for Drupal render elements.

Namespace

Drupal\bootstrap\Utility

Code

public function map(array $map) {
  \Drupal\Core\Render\Element::setAttributes($this->array, $map);
  return $this;
}