function NodeType::buildConfigurationForm
Overrides EntityBundle::buildConfigurationForm
File
-
src/
Plugin/ Condition/ NodeType.php, line 23
Class
Namespace
Drupal\ctools\Plugin\ConditionCode
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
$form = parent::buildConfigurationForm($form, $form_state);
$bundles = $this->entityTypeBundleInfo
->getBundleInfo('node');
$form['bundles'] = [
'#title' => $this->pluginDefinition['label'],
'#type' => 'checkboxes',
'#options' => array_combine(array_keys($bundles), array_column($bundles, 'label')),
'#default_value' => $this->configuration['bundles'],
];
return $form;
}