4 * Contains \Drupal\bootstrap\Plugin\Update\UpdateBase.
7 namespace Drupal\bootstrap\Plugin\Update;
9 use Drupal\bootstrap\Bootstrap;
10 use Drupal\bootstrap\Plugin\PluginBase;
11 use Drupal\bootstrap\Theme;
14 * Base class for an update.
16 * @ingroup plugins_update
18 class UpdateBase extends PluginBase implements UpdateInterface {
23 public function getDescription() {
24 return isset($this->pluginDefinition['description']) ? $this->pluginDefinition['description'] : NULL;
30 public function getLabel() {
31 return !empty($this->pluginDefinition['label']) ? $this->pluginDefinition['label'] : NULL;
37 public function getProvider() {
38 return isset($this->pluginDefinition['provider']) ? $this->pluginDefinition['provider'] : FALSE;
44 public function getSchema() {
45 return (int) $this->getPluginId();
51 public function getSeverity() {
52 return isset($this->pluginDefinition['severity']) ? $this->pluginDefinition['severity'] : FALSE;
58 public function getTheme() {
59 return Bootstrap::getTheme($this->pluginDefinition['provider']);
65 public function isPrivate() {
66 return !empty($this->pluginDefinition['private']);
72 public function process(Theme $theme, array &$context) {}
74 /*************************
76 *************************/
81 * @deprecated 8.x-3.0-rc2, will be removed before 8.x-3.0 is released.
83 * @see \Drupal\bootstrap\Plugin\Update\UpdateBase::getSeverity
85 public function getLevel() {
86 return $this->getSeverity();
92 * @deprecated 8.x-3.0-rc2, will be removed before 8.x-3.0 is released.
94 * @see \Drupal\bootstrap\Plugin\Update\UpdateBase::getLabel
96 public function getTitle() {
97 return $this->getLabel();