You are here

public function Variables::__construct in Express 8

Element constructor.

Parameters

array $variables: A theme hook variables array.

Overrides ArrayObject::__construct

File

themes/contrib/bootstrap/src/Utility/Variables.php, line 29
Contains \Drupal\bootstrap\Utility\Variables.

Class

Variables
Class to help modify template variables.

Namespace

Drupal\bootstrap\Utility

Code

public function __construct(array &$variables) {
  $this->array =& $variables;
  if (isset($variables['element']) && Element::isRenderArray($variables['element'])) {
    $this->element = Element::create($variables['element']);
  }
  elseif (isset($variables['elements']) && Element::isRenderArray($variables['elements'])) {
    $this->element = Element::create($variables['elements']);
  }
}