interface StateTransitionFormInterface in State Machine 8
Defines the interface for state transition forms.
Used for applying a transition to the form entity's state field.
Hierarchy
- interface \Drupal\Core\Form\FormInterface
- interface \Drupal\Core\Form\BaseFormIdInterface
- interface \Drupal\state_machine\Form\StateTransitionFormInterface
- interface \Drupal\Core\Form\BaseFormIdInterface
Expanded class hierarchy of StateTransitionFormInterface
All classes that implement StateTransitionFormInterface
File
- src/
Form/ StateTransitionFormInterface.php, line 13
Namespace
Drupal\state_machine\FormView source
interface StateTransitionFormInterface extends BaseFormIdInterface {
/**
* Gets the form entity.
*
* @return \Drupal\Core\Entity\EntityInterface
* The form entity.
*/
public function getEntity();
/**
* Sets the form entity.
*
* When the form is submitted, a transition will be applied to the entity,
* and the entity will be saved.
*
* @param \Drupal\Core\Entity\ContentEntityInterface $entity
* The form entity.
*
* @return $this
*/
public function setEntity(ContentEntityInterface $entity);
/**
* Gets the state field name.
*
* @return string
* The state field name.
*/
public function getFieldName();
/**
* Sets the state field name.
*
* @param string $field_name
* The state field name.
*
* @return $this
*/
public function setFieldName($field_name);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BaseFormIdInterface:: |
public | function | Returns a string identifying the base form. | 5 |
FormInterface:: |
public | function | Form constructor. | 179 |
FormInterface:: |
public | function | Returns a unique string identifying the form. | 236 |
FormInterface:: |
public | function | Form submission handler. | 192 |
FormInterface:: |
public | function | Form validation handler. | 30 |
StateTransitionFormInterface:: |
public | function | Gets the form entity. | 1 |
StateTransitionFormInterface:: |
public | function | Gets the state field name. | 1 |
StateTransitionFormInterface:: |
public | function | Sets the form entity. | 1 |
StateTransitionFormInterface:: |
public | function | Sets the state field name. | 1 |