interface TourTipPluginInterface
Same name in other branches
- 10 core/modules/tour/src/TourTipPluginInterface.php \Drupal\tour\TourTipPluginInterface
- 11.x core/modules/tour/src/TourTipPluginInterface.php \Drupal\tour\TourTipPluginInterface
Defines an interface for tour items.
@todo move all methods to TipPluginInterface and deprecate this interface in https://drupal.org/node/3195193
Hierarchy
- interface \Drupal\tour\TipPluginInterface
- interface \Drupal\tour\TourTipPluginInterface extends \Drupal\tour\TipPluginInterface
Expanded class hierarchy of TourTipPluginInterface
All classes that implement TourTipPluginInterface
See also
2 files declare their use of TourTipPluginInterface
- TipPluginImage.php in core/
modules/ tour/ tests/ tour_test/ src/ Plugin/ tour/ tip/ TipPluginImage.php - TipPluginText.php in core/
modules/ tour/ src/ Plugin/ tour/ tip/ TipPluginText.php
File
-
core/
modules/ tour/ src/ TourTipPluginInterface.php, line 16
Namespace
Drupal\tourView source
interface TourTipPluginInterface extends TipPluginInterface {
/**
* Returns the selector the tour tip will attach to.
*
* This typically maps to the Shepherd Step options `attachTo.element`
* property.
*
* @return null|string
* A selector string, or null for an unattached tip.
*
* @see https://shepherdjs.dev/docs/Step.html
*/
public function getSelector() : ?string;
/**
* Returns the body content of the tooltip.
*
* This typically maps to the Shepherd Step options `text` property.
*
* @return array
* A render array.
*
* @see https://shepherdjs.dev/docs/Step.html
*/
public function getBody() : array;
/**
* Returns the configured placement of the tip relative to the element.
*
* If null, the tip will automatically determine the best position based on
* the element's position in the viewport.
*
* This typically maps to the Shepherd Step options `attachTo.on` property.
*
* @return string|null
* The tip placement relative to the element.
*
* @see https://shepherdjs.dev/docs/Step.html
*/
public function getLocation() : ?string;
}
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 | |
TourTipPluginInterface::getBody | public | function | Returns the body content of the tooltip. | 2 | |
TourTipPluginInterface::getLocation | public | function | Returns the configured placement of the tip relative to the element. | ||
TourTipPluginInterface::getSelector | public | function | Returns the selector the tour tip will attach to. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.