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

Breadcrumb

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

function StateInterface::getTransitionTo

Gets the Transition object for the provided state ID.

Parameters

$to_state_id: The state to transition to.

Return value

\Drupal\workflows\TransitionInterface The Transition object for the provided state ID.

Throws

\InvalidArgumentException Exception thrown when the provided state ID can not be transitioned to.

2 methods override StateInterface::getTransitionTo()
ContentModerationState::getTransitionTo in core/modules/content_moderation/src/ContentModerationState.php
Gets the Transition object for the provided state ID.
State::getTransitionTo in core/modules/workflows/src/State.php
Gets the Transition object for the provided state ID.

File

core/modules/workflows/src/StateInterface.php, line 66

Class

StateInterface
An interface for state value objects.

Namespace

Drupal\workflows

Code

public function getTransitionTo($to_state_id);

API Navigation

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