You are here

protected function PreprocessBase::preprocessAttributes in Express 8

Ensures all attributes have been converted to an Attribute object.

11 calls to PreprocessBase::preprocessAttributes()
BootstrapCarousel::preprocessVariables in themes/contrib/bootstrap/src/Plugin/Preprocess/BootstrapCarousel.php
Preprocess the variables array.
BootstrapDropdown::preprocessVariables in themes/contrib/bootstrap/src/Plugin/Preprocess/BootstrapDropdown.php
Preprocess the variables array.
BootstrapModal::preprocessVariables in themes/contrib/bootstrap/src/Plugin/Preprocess/BootstrapModal.php
Preprocess the variables array.
BootstrapPanel::preprocessVariables in themes/contrib/bootstrap/src/Plugin/Preprocess/BootstrapPanel.php
Preprocess the variables array.
FileLink::preprocessVariables in themes/contrib/bootstrap/src/Plugin/Preprocess/FileLink.php
Preprocess the variables array.

... See full list

File

themes/contrib/bootstrap/src/Plugin/Preprocess/PreprocessBase.php, line 63
Contains \Drupal\bootstrap\Plugin\Preprocess\PreprocessBase.

Class

PreprocessBase
Base preprocess class used to build the necessary variables for templates.

Namespace

Drupal\bootstrap\Plugin\Preprocess

Code

protected function preprocessAttributes() {
  foreach ($this->variables as $name => $value) {
    if (strpos($name, 'attributes') !== FALSE && is_array($value)) {
      $this->variables[$name] = new Attribute($value);
    }
  }
}