function PluginWithFormsTrait::getFormClass
Same name in other branches
- 9 core/lib/Drupal/Core/Plugin/PluginWithFormsTrait.php \Drupal\Core\Plugin\PluginWithFormsTrait::getFormClass()
- 8.9.x core/lib/Drupal/Core/Plugin/PluginWithFormsTrait.php \Drupal\Core\Plugin\PluginWithFormsTrait::getFormClass()
- 11.x core/lib/Drupal/Core/Plugin/PluginWithFormsTrait.php \Drupal\Core\Plugin\PluginWithFormsTrait::getFormClass()
Implements \Drupal\Core\Plugin\PluginWithFormsInterface::getFormClass().
1 call to PluginWithFormsTrait::getFormClass()
- PluginWithFormsTrait::hasFormClass in core/
lib/ Drupal/ Core/ Plugin/ PluginWithFormsTrait.php - Implements \Drupal\Core\Plugin\PluginWithFormsInterface::hasFormClass().
File
-
core/
lib/ Drupal/ Core/ Plugin/ PluginWithFormsTrait.php, line 13
Class
- PluginWithFormsTrait
- Provides a trait with typical behavior for plugins which have forms.
Namespace
Drupal\Core\PluginCode
public function getFormClass($operation) {
if (isset($this->getPluginDefinition()['forms'][$operation])) {
return $this->getPluginDefinition()['forms'][$operation];
}
elseif ($operation === 'configure' && $this instanceof PluginFormInterface) {
return static::class;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.