annotate core/modules/tour/src/TipPluginInterface.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 4c8ae668cc8c
children
rev   line source
Chris@0 1 <?php
Chris@0 2
Chris@0 3 namespace Drupal\tour;
Chris@0 4
Chris@0 5 /**
Chris@0 6 * Defines an interface for tour items.
Chris@0 7 *
Chris@0 8 * @see \Drupal\tour\Annotation\Tip
Chris@0 9 * @see \Drupal\tour\TipPluginBase
Chris@0 10 * @see \Drupal\tour\TipPluginManager
Chris@0 11 * @see plugin_api
Chris@0 12 */
Chris@0 13 interface TipPluginInterface {
Chris@0 14
Chris@0 15 /**
Chris@0 16 * Returns id of the tip.
Chris@0 17 *
Chris@0 18 * @return string
Chris@0 19 * The id of the tip.
Chris@0 20 */
Chris@0 21 public function id();
Chris@0 22
Chris@0 23 /**
Chris@0 24 * Returns label of the tip.
Chris@0 25 *
Chris@0 26 * @return string
Chris@0 27 * The label of the tip.
Chris@0 28 */
Chris@0 29 public function getLabel();
Chris@0 30
Chris@0 31 /**
Chris@0 32 * Returns weight of the tip.
Chris@0 33 *
Chris@0 34 * @return string
Chris@0 35 * The weight of the tip.
Chris@0 36 */
Chris@0 37 public function getWeight();
Chris@0 38
Chris@0 39 /**
Chris@0 40 * Returns an array of attributes for the tip wrapper.
Chris@0 41 *
Chris@0 42 * @return array
Chris@0 43 * An array of classes and values.
Chris@0 44 */
Chris@0 45 public function getAttributes();
Chris@0 46
Chris@0 47 /**
Chris@0 48 * Used for returning values by key.
Chris@0 49 *
Chris@0 50 * @var string
Chris@0 51 * Key of the value.
Chris@0 52 *
Chris@0 53 * @return string
Chris@0 54 * Value of the key.
Chris@0 55 */
Chris@0 56 public function get($key);
Chris@0 57
Chris@0 58 /**
Chris@0 59 * Used for returning values by key.
Chris@0 60 *
Chris@0 61 * @var string
Chris@0 62 * Key of the value.
Chris@0 63 *
Chris@0 64 * @var string
Chris@0 65 * Value of the key.
Chris@0 66 */
Chris@0 67 public function set($key, $value);
Chris@0 68
Chris@0 69 /**
Chris@0 70 * Returns a renderable array.
Chris@0 71 *
Chris@0 72 * @return array
Chris@0 73 * A renderable array.
Chris@0 74 */
Chris@0 75 public function getOutput();
Chris@0 76
Chris@0 77 }