diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/area/Broken.php b/core/modules/views/lib/Drupal/views/Plugin/views/area/Broken.php index 64a63a0..9901a21 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/area/Broken.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/area/Broken.php @@ -18,8 +18,23 @@ */ class Broken extends AreaPluginBase { + /** + * Whether or not this handler is optional. + * + * @var bool + */ + protected $optional; + + /** + * {@inheritdoc} + */ + public function __construct(array $configuration, $plugin_id, array $plugin_definition) { + parent::__construct($configuration, $plugin_id, $plugin_definition); + $this->optional = $configuration['optional']; + } + public function adminLabel($short = FALSE) { - return t('Broken/missing handler'); + return $this->optional ? t('Optional handler is missing') : t('Broken/missing handler'); } public function defineOptions() { return array(); } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/argument/Broken.php b/core/modules/views/lib/Drupal/views/Plugin/views/argument/Broken.php index d74ab95..8e4262b 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/argument/Broken.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/argument/Broken.php @@ -18,8 +18,23 @@ */ class Broken extends ArgumentPluginBase { + /** + * Whether or not this handler is optional. + * + * @var bool + */ + protected $optional; + + /** + * {@inheritdoc} + */ + public function __construct(array $configuration, $plugin_id, array $plugin_definition) { + parent::__construct($configuration, $plugin_id, $plugin_definition); + $this->optional = $configuration['optional']; + } + public function adminLabel($short = FALSE) { - return t('Broken/missing handler'); + return $this->optional ? t('Optional handler is missing') : t('Broken/missing handler'); } public function defineOptions() { return array(); } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/field/Broken.php b/core/modules/views/lib/Drupal/views/Plugin/views/field/Broken.php index 6310248..cdc67c0 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/field/Broken.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/field/Broken.php @@ -18,8 +18,23 @@ */ class Broken extends FieldPluginBase { + /** + * Whether or not this handler is optional. + * + * @var bool + */ + protected $optional; + + /** + * {@inheritdoc} + */ + public function __construct(array $configuration, $plugin_id, array $plugin_definition) { + parent::__construct($configuration, $plugin_id, $plugin_definition); + $this->optional = $configuration['optional']; + } + public function adminLabel($short = FALSE) { - return t('Broken/missing handler'); + return $this->optional ? t('Optional handler is missing') : t('Broken/missing handler'); } public function defineOptions() { return array(); } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/filter/Broken.php b/core/modules/views/lib/Drupal/views/Plugin/views/filter/Broken.php index 701cabb..c4f2337 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/filter/Broken.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/filter/Broken.php @@ -21,13 +21,28 @@ class Broken extends FilterPluginBase { /** + * Whether or not this handler is optional. + * + * @var bool + */ + protected $optional; + + /** + * {@inheritdoc} + */ + public function __construct(array $configuration, $plugin_id, array $plugin_definition) { + parent::__construct($configuration, $plugin_id, $plugin_definition); + $this->optional = $configuration['optional']; + } + + /** * Overrides \Drupal\views\Plugin\views\filter\FilterPluginBase::init(). */ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) { } public function adminLabel($short = FALSE) { - return t('Broken/missing handler'); + return $this->optional ? t('Optional handler is missing') : t('Broken/missing handler'); } public function defineOptions() { return array(); } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/relationship/Broken.php b/core/modules/views/lib/Drupal/views/Plugin/views/relationship/Broken.php index c891f00..34e7c24 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/relationship/Broken.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/relationship/Broken.php @@ -18,8 +18,23 @@ */ class Broken extends RelationshipPluginBase { + /** + * Whether or not this handler is optional. + * + * @var bool + */ + protected $optional; + + /** + * {@inheritdoc} + */ + public function __construct(array $configuration, $plugin_id, array $plugin_definition) { + parent::__construct($configuration, $plugin_id, $plugin_definition); + $this->optional = $configuration['optional']; + } + public function adminLabel($short = FALSE) { - return t('Broken/missing handler'); + return $this->optional ? t('Optional handler is missing') : t('Broken/missing handler'); } public function defineOptions() { return array(); } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/sort/Broken.php b/core/modules/views/lib/Drupal/views/Plugin/views/sort/Broken.php index 341bc8b..498d1c5 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/sort/Broken.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/sort/Broken.php @@ -18,8 +18,23 @@ */ class Broken extends SortPluginBase { + /** + * Whether or not this handler is optional. + * + * @var bool + */ + protected $optional; + + /** + * {@inheritdoc} + */ + public function __construct(array $configuration, $plugin_id, array $plugin_definition) { + parent::__construct($configuration, $plugin_id, $plugin_definition); + $this->optional = $configuration['optional']; + } + public function adminLabel($short = FALSE) { - return t('Broken/missing handler'); + return $this->optional ? t('Optional handler is missing') : t('Broken/missing handler'); } public function defineOptions() { return array(); } diff --git a/core/modules/views/views.module b/core/modules/views/views.module index 4d656b6..632e02e 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -888,7 +888,7 @@ function views_get_handler($item, $type, $override = NULL) { } // Finally, use the 'broken' handler. - return $manager->createInstance('broken'); + return $manager->createInstance('broken', array('optional' => $optional)); } /**