function public static function Bootstrap::toString

8.x-3.x Bootstrap.php public static Bootstrap::toString(&$value)

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.

Class

Bootstrap
The primary class for the Drupal Bootstrap base theme.

Namespace

Drupal\bootstrap

Source src/Bootstrap.php (line 1551)

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