Mercurial > hg > isophonics-drupal-site
annotate core/modules/workflows/src/TransitionInterface.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children | 1fec387a4317 |
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@0 | 22 * Gets the transition's ID. |
Chris@0 | 23 * |
Chris@0 | 24 * @return string |
Chris@0 | 25 * The transition's ID. |
Chris@0 | 26 */ |
Chris@0 | 27 public function id(); |
Chris@0 | 28 |
Chris@0 | 29 /** |
Chris@0 | 30 * Gets the transition's label. |
Chris@0 | 31 * |
Chris@0 | 32 * @return string |
Chris@0 | 33 * The transition's label. |
Chris@0 | 34 */ |
Chris@0 | 35 public function label(); |
Chris@0 | 36 |
Chris@0 | 37 /** |
Chris@0 | 38 * Gets the transition's from states. |
Chris@0 | 39 * |
Chris@0 | 40 * @return \Drupal\workflows\StateInterface[] |
Chris@0 | 41 * The transition's from states. |
Chris@0 | 42 */ |
Chris@0 | 43 public function from(); |
Chris@0 | 44 |
Chris@0 | 45 /** |
Chris@0 | 46 * Gets the transition's to state. |
Chris@0 | 47 * |
Chris@0 | 48 * @return \Drupal\workflows\StateInterface |
Chris@0 | 49 * The transition's to state. |
Chris@0 | 50 */ |
Chris@0 | 51 public function to(); |
Chris@0 | 52 |
Chris@0 | 53 /** |
Chris@0 | 54 * Gets the transition's weight. |
Chris@0 | 55 * |
Chris@0 | 56 * @return string |
Chris@0 | 57 * The transition's weight. |
Chris@0 | 58 */ |
Chris@0 | 59 public function weight(); |
Chris@0 | 60 |
Chris@0 | 61 } |