class ComplexTestTypeStateForm
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
- 8.9.x core/modules/workflows/tests/modules/workflow_type_test/src/Form/ComplexTestTypeStateForm.php \Drupal\workflow_type_test\Form\ComplexTestTypeStateForm
- 10 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 \Drupal\Core\Plugin\PluginFormInterface, \Drupal\Component\Plugin\PluginAwareInterface uses \Drupal\Core\StringTranslation\StringTranslationTrait
- class \Drupal\workflow_type_test\Form\ComplexTestTypeStateForm extends \Drupal\workflows\Plugin\WorkflowTypeStateFormBase
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
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
ComplexTestTypeStateForm::buildConfigurationForm | public | function | Form constructor. | Overrides PluginFormInterface::buildConfigurationForm | |
StringTranslationTrait::$stringTranslation | protected | property | The string translation service. | 3 | |
StringTranslationTrait::formatPlural | protected | function | Formats a string containing a count of items. | ||
StringTranslationTrait::getNumberOfPlurals | protected | function | Returns the number of plurals supported by a given language. | ||
StringTranslationTrait::getStringTranslation | protected | function | Gets the string translation service. | ||
StringTranslationTrait::setStringTranslation | public | function | Sets the string translation service to use. | 2 | |
StringTranslationTrait::t | protected | function | Translates a string to the current language or to a given language. | ||
WorkflowTypeStateFormBase::$workflowType | protected | property | The workflow type. | ||
WorkflowTypeStateFormBase::setPlugin | public | function | Sets the plugin for this object. | Overrides PluginAwareInterface::setPlugin | |
WorkflowTypeStateFormBase::submitConfigurationForm | public | function | Form submission handler. | Overrides PluginFormInterface::submitConfigurationForm | |
WorkflowTypeStateFormBase::validateConfigurationForm | public | function | Form validation handler. | Overrides PluginFormInterface::validateConfigurationForm |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.