public function ContainerTrait::pathFieldset in GoogleTagManager 8
Fieldset builder for the container settings form.
2 calls to ContainerTrait::pathFieldset()
- ContainerForm::form in src/
Form/ ContainerForm.php - Gets the actual form array to be built.
- SettingsForm::buildForm in src/
Form/ SettingsForm.php - Form constructor.
File
- src/
Form/ ContainerTrait.php, line 132
Class
- ContainerTrait
- Defines shared routines for the container and settings forms.
Namespace
Drupal\google_tag\FormCode
public function pathFieldset(FormStateInterface &$form_state) {
$fieldset_title = $this
->t('Request path');
$fieldset_description = $this
->t('On this and the following tabs, specify the conditions on which the GTM JavaScript snippet will either be inserted on or omitted from the page response, thereby enabling or disabling tracking and other analytics. All conditions must be satisfied for the snippet to be inserted. The snippet will be omitted if any condition is not met.');
$args = [
'%node' => '/node',
'%user-wildcard' => '/user/*',
'%front' => '<front>',
];
$description = $this
->t('Enter one relative path per line using the "*" character as a wildcard. Example paths are: "%node" for the node page, "%user-wildcard" for each individual user, and "%front" for the front page.', $args);
$rows = 10;
$singular = 'path';
$plural = 'paths';
$adjective = 'listed';
$config = compact([
'fieldset_title',
'fieldset_description',
'singular',
'plural',
'adjective',
'description',
'rows',
]);
return $this
->genericFieldset($config, $form_state);
}