Commit 9de3548a authored by effulgentsia's avatar effulgentsia

Issue #2562811 by Jaesin, dawehner, jibran: Make...

Issue #2562811 by Jaesin, dawehner, jibran: Make \Drupal\views\Plugin\views\display\DisplayPluginBase::getType() public and add it to the interface
parent 6b0840d9
......@@ -83,7 +83,7 @@ public function optionsSummary(&$categories, &$options) {
/**
* Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::getType().
*/
protected function getType() {
public function getType() {
return 'entity_reference';
}
......
......@@ -143,7 +143,7 @@ public function initDisplay(ViewExecutable $view, array &$display, array &$optio
/**
* {@inheritdoc}
*/
protected function getType() {
public function getType() {
return 'data';
}
......
......@@ -2390,19 +2390,9 @@ function preview() {
}
/**
* Returns the display type that this display requires.
*
* This can be used for filtering views plugins. E.g. if a plugin category of
* 'foo' is specified, only plugins with no 'types' declared or 'types'
* containing 'foo'. If you have a type of bar, this plugin will not be used.
* This is applicable for style, row, access, cache, and exposed_form plugins.
*
* @return string
* The required display type. Defaults to 'normal'.
*
* @see \Drupal\views\Views::fetchPluginNames()
* {@inheritdoc}
*/
protected function getType() {
public function getType() {
return 'normal';
}
......
......@@ -491,6 +491,21 @@ public function buildRenderable(array $args = [], $cache = TRUE);
*/
function preview();
/**
* Returns the display type that this display requires.
*
* This can be used for filtering views plugins. E.g. if a plugin category of
* 'foo' is specified, only plugins with no 'types' declared or 'types'
* containing 'foo'. If you have a type of bar, this plugin will not be used.
* This is applicable for style, row, access, cache, and exposed_form plugins.
*
* @return string
* The required display type. Defaults to 'normal'.
*
* @see \Drupal\views\Views::fetchPluginNames()
*/
public function getType();
/**
* Make sure the display and all associated handlers are valid.
*
......
......@@ -48,7 +48,7 @@ class Feed extends PathPluginBase implements ResponseDisplayPluginInterface {
/**
* Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::getType().
*/
protected function getType() {
public function getType() {
return 'feed';
}
......
......@@ -35,7 +35,7 @@ class DisplayTest extends DisplayPluginBase {
/**
* Overrides \Drupal\views\Plugin\views\display\DisplayPluginBase::getType().
*/
protected function getType() {
public function getType() {
return 'test';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment