function public static function Element::isRenderArray

8.x-3.x Element.php public static Element::isRenderArray($value)

Checks if a value is a render array.

Parameters

mixed $value: The value to check.

Return value

bool TRUE if the given value is a render array, otherwise FALSE.

Class

Element
Provides helper methods for Drupal render elements.

Namespace

Drupal\bootstrap\Utility

Source src/Utility/Element.php (line 476)

public static function isRenderArray($value) {
  return is_array($value) && (isset($value['#type']) ||
    isset($value['#theme']) || isset($value['#theme_wrappers']) ||
    isset($value['#markup']) || isset($value['#attached']) ||
    isset($value['#cache']) || isset($value['#lazy_builder']) ||
    isset($value['#create_placeholder']) || isset($value['#pre_render']) ||
    isset($value['#post_render']) || isset($value['#process']));
}