You are here

public static function Bootstrap::toString in Express 8

Ensures a value is typecast to a string, rendering an array if necessary.

Parameters

string|array $value: The value to typecast, passed by reference.

Return value

string The typecast string value.

2 calls to Bootstrap::toString()
Bootstrap::cssClassFromString in themes/contrib/bootstrap/src/Bootstrap.php
Matches a Bootstrap class based on a string value.
Bootstrap::glyphiconFromString in themes/contrib/bootstrap/src/Bootstrap.php
Matches a Bootstrap Glyphicon based on a string value.

File

themes/contrib/bootstrap/src/Bootstrap.php, line 1155
Contains \Drupal\bootstrap\Bootstrap.

Class

Bootstrap
The primary class for the Drupal Bootstrap base theme.

Namespace

Drupal\bootstrap

Code

public static function toString(&$value) {
  return (string) (Element::isRenderArray($value) ? Element::create($value)
    ->renderPlain() : $value);
}