Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / workflows / src / WorkflowTypeInterface.php
index 5ef843b4cb3e1c5eab8a4aadab23b3fc66bd3ab5..0cb47a49044aa5d139007d3bb5eeb8ec8643fd06 100644 (file)
@@ -124,7 +124,7 @@ interface WorkflowTypeInterface extends PluginWithFormsInterface, DerivativeInsp
    *   A list of state IDs to get. If NULL then all states will be returned.
    *
    * @return \Drupal\workflows\StateInterface[]
-   *   An array of workflow states.
+   *   An array of workflow states, keyed by state IDs.
    *
    * @throws \InvalidArgumentException
    *   Thrown if $state_ids contains a state ID that does not exist.
@@ -248,13 +248,17 @@ interface WorkflowTypeInterface extends PluginWithFormsInterface, DerivativeInsp
    * @param $state_id
    *   The state to get transitions for.
    * @param string $direction
-   *   (optional) The direction of the transition. Defaults to 'from'. Possible
-   *   values are: 'from' and 'to'.
+   *   (optional) The direction of the transition, defaults to
+   *   TransitionInterface::DIRECTION_FROM. Possible values are:
+   *   TransitionInterface::DIRECTION_FROM or TransitionInterface::DIRECTION_TO.
    *
    * @return array
    *   The transition IDs for a state for the provided direction.
+   *
+   * @see \Drupal\workflows\TransitionInterface::DIRECTION_FROM
+   * @see \Drupal\workflows\TransitionInterface::DIRECTION_TO
    */
-  public function getTransitionsForState($state_id, $direction = 'from');
+  public function getTransitionsForState($state_id, $direction = TransitionInterface::DIRECTION_FROM);
 
   /**
    * Gets a transition from state to state.