function PathElement::getInfo

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Render/Element/PathElement.php \Drupal\Core\Render\Element\PathElement::getInfo()
  2. 8.9.x core/lib/Drupal/Core/Render/Element/PathElement.php \Drupal\Core\Render\Element\PathElement::getInfo()
  3. 11.x core/lib/Drupal/Core/Render/Element/PathElement.php \Drupal\Core\Render\Element\PathElement::getInfo()

Overrides Textfield::getInfo

File

core/lib/Drupal/Core/Render/Element/PathElement.php, line 36

Class

PathElement
Provides a matched path render element.

Namespace

Drupal\Core\Render\Element

Code

public function getInfo() {
  $info = parent::getInfo();
  $class = static::class;
  $info['#validate_path'] = TRUE;
  $info['#convert_path'] = self::CONVERT_ROUTE;
  $info['#element_validate'] = [
    [
      $class,
      'validateMatchedPath',
    ],
  ];
  return $info;
}

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