class ComplexTestTypeStateForm in Drupal 8
Same name and namespace in other branches
- 9 core/modules/workflows/tests/modules/workflow_type_test/src/Form/ComplexTestTypeStateForm.php \Drupal\workflow_type_test\Form\ComplexTestTypeStateForm
Form to configure the complex test workflow states.
Hierarchy
- class \Drupal\workflows\Plugin\WorkflowTypeStateFormBase implements PluginAwareInterface, PluginFormInterface uses StringTranslationTrait
- class \Drupal\workflow_type_test\Form\ComplexTestTypeStateForm
Expanded class hierarchy of ComplexTestTypeStateForm
See also
\Drupal\workflow_type_test\Plugin\WorkflowType\ComplexTestType
File
- core/
modules/ workflows/ tests/ modules/ workflow_type_test/ src/ Form/ ComplexTestTypeStateForm.php, line 13
Namespace
Drupal\workflow_type_test\FormView source
class ComplexTestTypeStateForm extends WorkflowTypeStateFormBase {
/**
* {@inheritdoc}
*/
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
$state = $form_state
->get('state');
$configuration = $this->workflowType
->getConfiguration();
$form['extra'] = [
'#type' => 'textfield',
'#title' => $this
->t('Extra'),
'#description' => $this
->t('Extra information added to state'),
'#default_value' => $state && isset($configuration['states'][$state
->id()]['extra']) ? $configuration['states'][$state
->id()]['extra'] : '',
];
return $form;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ComplexTestTypeStateForm:: |
public | function |
Form constructor. Overrides PluginFormInterface:: |
|
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
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. | |
WorkflowTypeStateFormBase:: |
protected | property | The workflow type. | |
WorkflowTypeStateFormBase:: |
public | function |
Sets the plugin for this object. Overrides PluginAwareInterface:: |
|
WorkflowTypeStateFormBase:: |
public | function |
Form submission handler. Overrides PluginFormInterface:: |
|
WorkflowTypeStateFormBase:: |
public | function |
Form validation handler. Overrides PluginFormInterface:: |