class NodeType
Same name in other branches
- 4.0.x src/Plugin/Condition/NodeType.php \Drupal\ctools\Plugin\Condition\NodeType
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\Core\Plugin\PluginBase extends \Drupal\Component\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait
- class \Drupal\Core\Executable\ExecutablePluginBase extends \Drupal\Core\Plugin\PluginBase implements \Drupal\Core\Executable\ExecutableInterface, \Drupal\Core\Cache\CacheableDependencyInterface, \Drupal\Core\Plugin\ContextAwarePluginInterface uses \Drupal\Core\Plugin\ContextAwarePluginTrait
- class \Drupal\Core\Condition\ConditionPluginBase extends \Drupal\Core\Executable\ExecutablePluginBase implements \Drupal\Core\Condition\ConditionInterface uses \Drupal\Core\Plugin\ContextAwarePluginAssignmentTrait
- class \Drupal\Core\Entity\Plugin\Condition\EntityBundle extends \Drupal\Core\Condition\ConditionPluginBase implements \Drupal\Core\Plugin\ContainerFactoryPluginInterface
- class \Drupal\ctools\Plugin\Condition\EntityBundle extends \Drupal\Core\Entity\Plugin\Condition\EntityBundle implements \Drupal\ctools\ConstraintConditionInterface
- class \Drupal\ctools\Plugin\Condition\NodeType extends \Drupal\ctools\Plugin\Condition\EntityBundle
- class \Drupal\ctools\Plugin\Condition\EntityBundle extends \Drupal\Core\Entity\Plugin\Condition\EntityBundle implements \Drupal\ctools\ConstraintConditionInterface
- class \Drupal\Core\Entity\Plugin\Condition\EntityBundle extends \Drupal\Core\Condition\ConditionPluginBase implements \Drupal\Core\Plugin\ContainerFactoryPluginInterface
- class \Drupal\Core\Condition\ConditionPluginBase extends \Drupal\Core\Executable\ExecutablePluginBase implements \Drupal\Core\Condition\ConditionInterface uses \Drupal\Core\Plugin\ContextAwarePluginAssignmentTrait
- class \Drupal\Core\Executable\ExecutablePluginBase extends \Drupal\Core\Plugin\PluginBase implements \Drupal\Core\Executable\ExecutableInterface, \Drupal\Core\Cache\CacheableDependencyInterface, \Drupal\Core\Plugin\ContextAwarePluginInterface uses \Drupal\Core\Plugin\ContextAwarePluginTrait
- class \Drupal\Core\Plugin\PluginBase extends \Drupal\Component\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait
Expanded class hierarchy of NodeType
1 file declares its use of NodeType
- ctools.module in ./
ctools.module - Provides utility and helper APIs for Drupal developers and site builders.
File
-
src/
Plugin/ Condition/ NodeType.php, line 18
Namespace
Drupal\ctools\Plugin\ConditionView source
class NodeType extends EntityBundle {
/**
* {@inheritdoc}
*/
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;
}
}