function RequestPath::buildConfigurationForm

Same name in other branches
  1. 9 core/modules/system/src/Plugin/Condition/RequestPath.php \Drupal\system\Plugin\Condition\RequestPath::buildConfigurationForm()
  2. 10 core/modules/system/src/Plugin/Condition/RequestPath.php \Drupal\system\Plugin\Condition\RequestPath::buildConfigurationForm()
  3. 11.x core/modules/system/src/Plugin/Condition/RequestPath.php \Drupal\system\Plugin\Condition\RequestPath::buildConfigurationForm()

Overrides ConditionPluginBase::buildConfigurationForm

File

core/modules/system/src/Plugin/Condition/RequestPath.php, line 109

Class

RequestPath
Provides a 'Request Path' condition.

Namespace

Drupal\system\Plugin\Condition

Code

public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
    $form['pages'] = [
        '#type' => 'textarea',
        '#title' => $this->t('Pages'),
        '#default_value' => $this->configuration['pages'],
        '#description' => $this->t("Specify pages by using their paths. Enter one path per line. The '*' character is a wildcard. An example path is %user-wildcard for every user page. %front is the front page.", [
            '%user-wildcard' => '/user/*',
            '%front' => '<front>',
        ]),
    ];
    return parent::buildConfigurationForm($form, $form_state);
}

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