Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. RequestPath.php

function RequestPath::buildConfigurationForm

Overrides ConditionPluginBase::buildConfigurationForm

File

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

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);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal