You are here

public function WorkflowTransitionEvent::getField in State Machine 8

Gets the state field.

Return value

\Drupal\state_machine\Plugin\Field\FieldType\StateItemInterface The state field.

File

src/Event/WorkflowTransitionEvent.php, line 108

Class

WorkflowTransitionEvent
Defines the workflow transition event.

Namespace

Drupal\state_machine\Event

Code

public function getField() {

  /** @var \Drupal\state_machine\Plugin\Field\FieldType\StateItemInterface $field */
  $field = $this->entity
    ->get($this->fieldName)
    ->first();
  return $field;
}