Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. State.php

function State::canTransitionTo

Overrides StateInterface::canTransitionTo

1 call to State::canTransitionTo()
State::getTransitionTo in core/modules/workflows/src/State.php
Gets the Transition object for the provided state ID.

File

core/modules/workflows/src/State.php, line 81

Class

State
A value object representing a workflow state.

Namespace

Drupal\workflows

Code

public function canTransitionTo($to_state_id) {
    return $this->workflow
        ->hasTransitionFromStateToState($this->id, $to_state_id);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal