public function ContainerForm::conditionFieldset in GoogleTagManager 8
Returns the form elements from the condition plugin object.
Parameters
\Drupal\Core\Condition\ConditionInterface $condition: The condition plugin.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form array for the insertion condition.
1 call to ContainerForm::conditionFieldset()
- ContainerForm::conditionsForm in src/
Form/ ContainerForm.php - Builds the form elements for the insertion conditions.
File
- src/
Form/ ContainerForm.php, line 222
Class
- ContainerForm
- Defines the Google tag manager container settings form.
Namespace
Drupal\google_tag\FormCode
public function conditionFieldset(ConditionInterface $condition, FormStateInterface $form_state) {
// Build form elements.
$fieldset = [
'#type' => 'details',
'#title' => $condition
->getPluginDefinition()['label'],
'#group' => 'conditions',
'#tree' => TRUE,
] + $condition
->buildConfigurationForm([], $form_state);
return $fieldset;
}