diff --git a/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php b/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php index 7528d58..65e8ece 100644 --- a/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php +++ b/core/modules/block/lib/Drupal/block/Plugin/views/display/Block.php @@ -21,6 +21,7 @@ * id = "block", * module = "block", * title = @Translation("Block"), + * uses_hook_block = TRUE, * help = @Translation("Display the view as a block."), * theme = "views_view", * contextual_links_locations = {"block"}, diff --git a/core/modules/search/lib/Drupal/search/Plugin/views/row/SearchRow.php b/core/modules/search/lib/Drupal/search/Plugin/views/row/SearchRow.php index 5d1eeaa..945b845 100644 --- a/core/modules/search/lib/Drupal/search/Plugin/views/row/SearchRow.php +++ b/core/modules/search/lib/Drupal/search/Plugin/views/row/SearchRow.php @@ -18,7 +18,7 @@ * id = "search_view", * module = "search", * title = @Translation("Search"), - * no_uid = TRUE + * help = @Translation("Provides a row plugin to display search results.") * ) */ class SearchRow extends RowPluginBase { diff --git a/core/modules/views/lib/Drupal/views/Annotation/ViewsDisplay.php b/core/modules/views/lib/Drupal/views/Annotation/ViewsDisplay.php index 7795604..8984404 100644 --- a/core/modules/views/lib/Drupal/views/Annotation/ViewsDisplay.php +++ b/core/modules/views/lib/Drupal/views/Annotation/ViewsDisplay.php @@ -63,6 +63,20 @@ class ViewsDisplay extends ViewsPluginAnnotationBase { public $uses_hook_menu; /** + * Does the display plugin registers routes to the route. + * + * @var bool + */ + public $uses_route; + + /** + * Does the display plugin provide blocks. + * + * @var bool + */ + public $uses_hook_block; + + /** * An array with places where contextual links should be added. Can for * example be 'page' or 'block'. If you don't specify it there will be * contextual links around the rendered view. If this is not set or regions @@ -106,6 +120,8 @@ public function get() { 'admin' => isset($this->admin) ? $this->admin->get() : '', 'help' => $this->help->get(), 'uses_hook_menu' => $this->uses_hook_menu, + 'uses_hook_block' => $this->uses_hook_block, + 'uses_route' => $this->uses_route, 'contextual_links_locations' => $this->contextual_links_locations, 'base' => $this->base, 'theme' => $this->theme, diff --git a/core/modules/views/lib/Drupal/views/Annotation/ViewsPager.php b/core/modules/views/lib/Drupal/views/Annotation/ViewsPager.php index 133c876..548eb42 100644 --- a/core/modules/views/lib/Drupal/views/Annotation/ViewsPager.php +++ b/core/modules/views/lib/Drupal/views/Annotation/ViewsPager.php @@ -32,7 +32,16 @@ class ViewsPager extends ViewsPluginAnnotationBase { * * @ingroup plugin_translatable */ - public $title; + public $title; + + /** + * The "short" title for the pager type, used in the views UI. + * + * @var \Drupal\Core\Annotation\Translation + * + * @ingroup plugin_translatable + */ + public $short_title; /** * A short help string; this is displayed in the views UI. diff --git a/core/modules/views/lib/Drupal/views/Plugin/ViewsPluginManager.php b/core/modules/views/lib/Drupal/views/Plugin/ViewsPluginManager.php index 9a9d8fb..65abb81 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/ViewsPluginManager.php +++ b/core/modules/views/lib/Drupal/views/Plugin/ViewsPluginManager.php @@ -34,11 +34,11 @@ class ViewsPluginManager extends PluginManagerBase { */ public function __construct($type, \Traversable $namespaces) { $annotation_namespaces = array( - 'Drupal\views\Plugin\Annotation' => $namespaces['views'], + 'Drupal\views\Annotation' => $namespaces['Drupal\views'], ); - $plugin_definition_annotation_name = 'Drupal\views\Plugin\Annotation\\Views' . Container::camelize($type); - $this->discovery = new AnnotatedClassDiscovery("views\$type", $namespaces, $annotation_namespaces, $plugin_definition_annotation_name); + $plugin_definition_annotation_name = 'Drupal\views\Annotation\Views' . Container::camelize($type); + $this->discovery = new AnnotatedClassDiscovery("views/$type", $namespaces, $annotation_namespaces, $plugin_definition_annotation_name); $this->discovery = new DerivativeDiscoveryDecorator($this->discovery); $this->discovery = new ProcessDecorator($this->discovery, array($this, 'processDefinition'));