function TipPluginBase::getLocation
Same name in other branches
- 9 core/modules/tour/src/TipPluginBase.php \Drupal\tour\TipPluginBase::getLocation()
- 10 core/modules/tour/src/TipPluginBase.php \Drupal\tour\TipPluginBase::getLocation()
Overrides TipPluginInterface::getLocation
File
-
core/
modules/ tour/ src/ TipPluginBase.php, line 71
Class
- TipPluginBase
- Defines a base tour item implementation.
Namespace
Drupal\tourCode
public function getLocation() : ?string {
$location = $this->get('position');
// The location values accepted by PopperJS, the library used for
// positioning the tip.
assert(in_array(trim($location ?? ''), [
'auto',
'auto-start',
'auto-end',
'top',
'top-start',
'top-end',
'bottom',
'bottom-start',
'bottom-end',
'right',
'right-start',
'right-end',
'left',
'left-start',
'left-end',
'',
], TRUE), "{$location} is not a valid Tour Tip position value");
return $location;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.