abstract class WorkflowTypeTransitionFormBase in Drupal 9
Same name and namespace in other branches
- 8 core/modules/workflows/src/Plugin/WorkflowTypeTransitionFormBase.php \Drupal\workflows\Plugin\WorkflowTypeTransitionFormBase
A base class for workflow type transition forms.
Hierarchy
- class \Drupal\workflows\Plugin\WorkflowTypeTransitionFormBase implements PluginAwareInterface, PluginFormInterface uses StringTranslationTrait
Expanded class hierarchy of WorkflowTypeTransitionFormBase
1 file declares its use of WorkflowTypeTransitionFormBase
- ComplexTestTypeTransitionForm.php in core/
modules/ workflows/ tests/ modules/ workflow_type_test/ src/ Form/ ComplexTestTypeTransitionForm.php
File
- core/
modules/ workflows/ src/ Plugin/ WorkflowTypeTransitionFormBase.php, line 14
Namespace
Drupal\workflows\PluginView source
abstract class WorkflowTypeTransitionFormBase implements PluginFormInterface, PluginAwareInterface {
use StringTranslationTrait;
/**
* The workflow type.
*
* @var \Drupal\workflows\WorkflowTypeInterface
*/
protected $workflowType;
/**
* {@inheritdoc}
*/
public function setPlugin(PluginInspectionInterface $plugin) {
$this->workflowType = $plugin;
}
/**
* {@inheritdoc}
*/
public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {
}
/**
* {@inheritdoc}
*/
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
$values = $form_state
->getValues();
$transition = $form_state
->get('transition');
$configuration = $this->workflowType
->getConfiguration();
$configuration['transitions'][$transition
->id()] = $values + $configuration['transitions'][$transition
->id()];
$this->workflowType
->setConfiguration($configuration);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PluginFormInterface:: |
public | function | Form constructor. | 37 |
StringTranslationTrait:: |
protected | property | The string translation service. | 4 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. | |
WorkflowTypeTransitionFormBase:: |
protected | property | The workflow type. | |
WorkflowTypeTransitionFormBase:: |
public | function |
Sets the plugin for this object. Overrides PluginAwareInterface:: |
|
WorkflowTypeTransitionFormBase:: |
public | function |
Form submission handler. Overrides PluginFormInterface:: |
|
WorkflowTypeTransitionFormBase:: |
public | function |
Form validation handler. Overrides PluginFormInterface:: |