function ComponentsTwigExtension::validateProps

Same name in other branches
  1. 11.x core/lib/Drupal/Core/Template/ComponentsTwigExtension.php \Drupal\Core\Template\ComponentsTwigExtension::validateProps()

Validates the props in development environments.

Parameters

array $context: The context provided to the component.

string $component_id: The component ID.

Throws

\Drupal\Core\Render\Component\Exception\InvalidComponentException

File

core/lib/Drupal/Core/Template/ComponentsTwigExtension.php, line 108

Class

ComponentsTwigExtension
The twig extension so Drupal can recognize the new code.

Namespace

Drupal\Core\Template

Code

public function validateProps(array &$context, string $component_id) : void {
    assert($this->doValidateProps($context, $component_id));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.