abstract class TipPluginBaseextends PluginBase implements TipPluginInterface {
/**
* The label which is used for render of this tip.
*
* @var string
*/
protected $label;
/**
* Allows tips to take more priority that others.
*
* @var string
*/
protected $weight;
/**
* The attributes that will be applied to the markup of this tip.
*
* @var array
*/
protected $attributes;
/**
* Implements \Drupal\tour\TipPluginInterface::getLabel().
*/
public functiongetLabel() {
return$this
->get('label');
}
/**
* Implements \Drupal\tour\TipPluginInterface::getWeight().
*/
public functiongetWeight() {
return$this
->get('weight');
}
/**
* Implements \Drupal\tour\TipPluginInterface::getAttributes().
*/
public functiongetAttributes() {
return$this
->get('attributes');
}
/**
* Implements \Drupal\tour\TipPluginInterface::get().
*/
public functionget($key) {
if (!empty($this->configuration[$key])) {
return$this->configuration[$key];
}
}
/**
* Implements \Drupal\tour\TipPluginInterface::set().
*/
public functionset($key, $value) {
$this->configuration[$key] = $value;
}
}