interface TipPluginInterface

Same name in other branches
  1. 8.9.x core/modules/tour/src/TipPluginInterface.php \Drupal\tour\TipPluginInterface
  2. 10 core/modules/tour/src/TipPluginInterface.php \Drupal\tour\TipPluginInterface
  3. 11.x core/modules/tour/src/TipPluginInterface.php \Drupal\tour\TipPluginInterface

Defines an interface for tour items.

Hierarchy

Expanded class hierarchy of TipPluginInterface

All classes that implement TipPluginInterface

See also

\Drupal\tour\Annotation\Tip

\Drupal\tour\TipPluginBase

\Drupal\tour\TipPluginManager

Plugin API

File

core/modules/tour/src/TipPluginInterface.php, line 13

Namespace

Drupal\tour
View source
interface TipPluginInterface {
    
    /**
     * Returns id of the tip.
     *
     * @return string
     *   The id of the tip.
     */
    public function id();
    
    /**
     * Returns label of the tip.
     *
     * @return string
     *   The label of the tip.
     */
    public function getLabel();
    
    /**
     * Returns weight of the tip.
     *
     * @return string
     *   The weight of the tip.
     */
    public function getWeight();
    
    /**
     * Returns an array of attributes for the tip wrapper.
     *
     * @deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. The
     *   attributes property is no longer used.
     * @see https://www.drupal.org/node/3204093
     *
     * @return array
     *   An array of classes and values.
     */
    public function getAttributes();
    
    /**
     * Used for returning values by key.
     *
     * @var string
     *   Key of the value.
     *
     * @return string
     *   Value of the key.
     */
    public function get($key);
    
    /**
     * Used for returning values by key.
     *
     * @var string
     *   Key of the value.
     *
     * @var string
     *   Value of the key.
     */
    public function set($key, $value);
    
    /**
     * Returns a renderable array.
     *
     * @deprecated in drupal:9.2.0 and is removed from drupal:10.0.0. Use
     *   getBody() instead, and do not include the tip label in the returned
     *   output.
     * @see https://www.drupal.org/node/3195234
     *
     * @return array
     *   A renderable array.
     */
    public function getOutput();

}

Members

Title Sort descending Deprecated Modifiers Object type Summary Overrides
TipPluginInterface::get public function Used for returning values by key. 1
TipPluginInterface::getAttributes Deprecated public function Returns an array of attributes for the tip wrapper. 1
TipPluginInterface::getLabel public function Returns label of the tip. 1
TipPluginInterface::getOutput Deprecated public function Returns a renderable array. 1
TipPluginInterface::getWeight public function Returns weight of the tip. 1
TipPluginInterface::id public function Returns id of the tip. 1
TipPluginInterface::set public function Used for returning values by key. 1

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.