Mercurial > hg > isophonics-drupal-site
annotate core/modules/workflows/src/TransitionInterface.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 1fec387a4317 |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 namespace Drupal\workflows; |
Chris@0 | 4 |
Chris@0 | 5 /** |
Chris@0 | 6 * A transition value object that describes the transition between two states. |
Chris@0 | 7 * |
Chris@0 | 8 * @internal |
Chris@0 | 9 * The TransitionInterface should only be used by Workflows and Content |
Chris@0 | 10 * Moderation. |
Chris@0 | 11 * |
Chris@0 | 12 * @todo Revisit the need for this in https://www.drupal.org/node/2902309. |
Chris@0 | 13 */ |
Chris@0 | 14 interface TransitionInterface { |
Chris@0 | 15 |
Chris@0 | 16 /** |
Chris@0 | 17 * The key of the transition plugin form. |
Chris@0 | 18 */ |
Chris@0 | 19 const PLUGIN_FORM_KEY = 'transition'; |
Chris@0 | 20 |
Chris@0 | 21 /** |
Chris@14 | 22 * The transition direction from. |
Chris@14 | 23 */ |
Chris@14 | 24 const DIRECTION_FROM = 'from'; |
Chris@14 | 25 |
Chris@14 | 26 /** |
Chris@14 | 27 * The transition direction to. |
Chris@14 | 28 */ |
Chris@14 | 29 const DIRECTION_TO = 'to'; |
Chris@14 | 30 |
Chris@14 | 31 /** |
Chris@0 | 32 * Gets the transition's ID. |
Chris@0 | 33 * |
Chris@0 | 34 * @return string |
Chris@0 | 35 * The transition's ID. |
Chris@0 | 36 */ |
Chris@0 | 37 public function id(); |
Chris@0 | 38 |
Chris@0 | 39 /** |
Chris@0 | 40 * Gets the transition's label. |
Chris@0 | 41 * |
Chris@0 | 42 * @return string |
Chris@0 | 43 * The transition's label. |
Chris@0 | 44 */ |
Chris@0 | 45 public function label(); |
Chris@0 | 46 |
Chris@0 | 47 /** |
Chris@0 | 48 * Gets the transition's from states. |
Chris@0 | 49 * |
Chris@0 | 50 * @return \Drupal\workflows\StateInterface[] |
Chris@0 | 51 * The transition's from states. |
Chris@0 | 52 */ |
Chris@0 | 53 public function from(); |
Chris@0 | 54 |
Chris@0 | 55 /** |
Chris@0 | 56 * Gets the transition's to state. |
Chris@0 | 57 * |
Chris@0 | 58 * @return \Drupal\workflows\StateInterface |
Chris@0 | 59 * The transition's to state. |
Chris@0 | 60 */ |
Chris@0 | 61 public function to(); |
Chris@0 | 62 |
Chris@0 | 63 /** |
Chris@0 | 64 * Gets the transition's weight. |
Chris@0 | 65 * |
Chris@0 | 66 * @return string |
Chris@0 | 67 * The transition's weight. |
Chris@0 | 68 */ |
Chris@0 | 69 public function weight(); |
Chris@0 | 70 |
Chris@0 | 71 } |