elseif ($double_colon > 0
) { $callback =
explode('::',
$callback, 2
);
} } $message =
sprintf('Render %s callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725',
$callback_type, '%s'
);
// Add \Drupal\Core\Render\Element\RenderCallbackInterface as an extra
// trusted interface so that:
// - All public methods on Render elements are considered trusted.
// - Helper classes that contain only callback methods can implement this
// instead of TrustedCallbackInterface.
return $this->
doTrustedCallback($callback,
$args,
$message, TrustedCallbackInterface::THROW_EXCEPTION, RenderCallbackInterface::
class);
} /**
* Add cache debug information to the render array.
*
* @param array $elements
* The renderable array that must be wrapped with the cache debug output.
* @param bool $is_cache_hit
* A flag indicating that the cache is hit or miss.
* @param array $pre_bubbling_elements
* The renderable array for pre-bubbling elements.
* @param float $render_time
* The rendering time.
*
* @return array
* The renderable array.
*/