3 namespace Drupal\bootstrap\Plugin\Update;
5 use Drupal\bootstrap\Bootstrap;
6 use Drupal\bootstrap\Plugin\PluginBase;
7 use Drupal\bootstrap\Theme;
10 * Base class for an update.
12 * @ingroup plugins_update
14 class UpdateBase extends PluginBase implements UpdateInterface {
19 public function getDescription() {
20 return isset($this->pluginDefinition['description']) ? $this->pluginDefinition['description'] : NULL;
26 public function getLabel() {
27 return !empty($this->pluginDefinition['label']) ? $this->pluginDefinition['label'] : NULL;
33 public function getProvider() {
34 return isset($this->pluginDefinition['provider']) ? $this->pluginDefinition['provider'] : FALSE;
40 public function getSchema() {
41 return (int) $this->getPluginId();
47 public function getSeverity() {
48 return isset($this->pluginDefinition['severity']) ? $this->pluginDefinition['severity'] : FALSE;
54 public function getTheme() {
55 return Bootstrap::getTheme($this->pluginDefinition['provider']);
61 public function isPrivate() {
62 return !empty($this->pluginDefinition['private']);
68 public function process(Theme $theme, array &$context) {}
70 /*************************
72 *************************/
77 * @deprecated 8.x-3.0-rc2, will be removed before 8.x-3.0 is released.
79 * @see \Drupal\bootstrap\Plugin\Update\UpdateBase::getSeverity
81 public function getLevel() {
82 return $this->getSeverity();
88 * @deprecated 8.x-3.0-rc2, will be removed before 8.x-3.0 is released.
90 * @see \Drupal\bootstrap\Plugin\Update\UpdateBase::getLabel
92 public function getTitle() {
93 return $this->getLabel();