Issue #1744186 by damiankloip, tim.plunkett: Move uses_options() from plugin annotation to a class property.

8.0.x
Tim Plunkett 2012-08-23 16:29:26 +02:00
parent 53c7d23519
commit e6bddaea6e
32 changed files with 86 additions and 59 deletions

View File

@ -46,6 +46,13 @@ abstract class PluginBase extends ComponentPluginBase {
*/ */
public $localization_keys; public $localization_keys;
/**
* Denotes whether the plugin has an additional options form.
*
* @var bool
*/
public $usesOptions = FALSE;
/** /**
* Constructs a Plugin object. * Constructs a Plugin object.
*/ */
@ -452,4 +459,11 @@ abstract class PluginBase extends ComponentPluginBase {
return check_plain($this->definition['title']); return check_plain($this->definition['title']);
} }
/**
* Returns the usesOptions property.
*/
function usesOptions() {
return $this->usesOptions;
}
} }

View File

@ -19,12 +19,16 @@ use Drupal\Core\Annotation\Translation;
* id = "perm", * id = "perm",
* title = @Translation("Permission"), * title = @Translation("Permission"),
* help = @Translation("Access will be granted to users with the specified permission string."), * help = @Translation("Access will be granted to users with the specified permission string."),
* help_topic = "access-perm", * help_topic = "access-perm"
* uses_options = TRUE
* ) * )
*/ */
class Permission extends AccessPluginBase { class Permission extends AccessPluginBase {
/**
* Overrides Drupal\views\Plugin\Plugin::$usesOptions.
*/
public $usesOptions = TRUE;
function access($account) { function access($account) {
return views_check_perm($this->options['perm'], $account); return views_check_perm($this->options['perm'], $account);
} }

View File

@ -19,12 +19,16 @@ use Drupal\Core\Annotation\Translation;
* id = "role", * id = "role",
* title = @Translation("Role"), * title = @Translation("Role"),
* help = @Translation("Access will be granted to users with any of the specified roles."), * help = @Translation("Access will be granted to users with any of the specified roles."),
* help_topic = "access-role", * help_topic = "access-role"
* uses_options = TRUE
* ) * )
*/ */
class Role extends AccessPluginBase { class Role extends AccessPluginBase {
/**
* Overrides Drupal\views\Plugin\Plugin::$usesOptions.
*/
public $usesOptions = TRUE;
function access($account) { function access($account) {
return views_check_roles(array_filter($this->options['role']), $account); return views_check_roles(array_filter($this->options['role']), $account);
} }

View File

@ -678,10 +678,10 @@ abstract class ArgumentPluginBase extends HandlerBase {
); );
foreach ($summary_plugins as $id => $info) { foreach ($summary_plugins as $id => $info) {
if (empty($info['uses_options'])) { $plugin = $this->get_plugin('style', $id);
if (!$plugin->usesOptions()) {
continue; continue;
} }
$plugin = $this->get_plugin('style', $id);
if ($plugin) { if ($plugin) {
$form['summary']['options'][$id] = array( $form['summary']['options'][$id] = array(
'#prefix' => '<div id="edit-options-summary-options-' . $id . '-wrapper">', '#prefix' => '<div id="edit-options-summary-options-' . $id . '-wrapper">',

View File

@ -19,12 +19,16 @@ use Drupal\Core\Annotation\Translation;
* id = "time", * id = "time",
* title = @Translation("Time-based"), * title = @Translation("Time-based"),
* help = @Translation("Simple time-based caching of data."), * help = @Translation("Simple time-based caching of data."),
* help_topic = "cache-time", * help_topic = "cache-time"
* uses_options = TRUE
* ) * )
*/ */
class Time extends CachePluginBase { class Time extends CachePluginBase {
/**
* Overrides Drupal\views\Plugin\Plugin::$usesOptions.
*/
public $usesOptions = TRUE;
function option_definition() { function option_definition() {
$options = parent::option_definition(); $options = parent::option_definition();
$options['results_lifespan'] = array('default' => 3600); $options['results_lifespan'] = array('default' => 3600);

View File

@ -44,6 +44,11 @@ abstract class DisplayPluginBase extends PluginBase {
*/ */
var $extender = array(); var $extender = array();
/**
* Overrides Drupal\views\Plugin\Plugin::$usesOptions.
*/
public $usesOptions = TRUE;
/** /**
* Stores the rendered output of the display. * Stores the rendered output of the display.
* *
@ -1209,7 +1214,7 @@ abstract class DisplayPluginBase extends PluginBase {
); );
// This adds a 'Settings' link to the style_options setting if the style has options. // This adds a 'Settings' link to the style_options setting if the style has options.
if (!empty($style_plugin['uses_options'])) { if ($style_plugin_instance->usesOptions()) {
$options['style_plugin']['links']['style_options'] = t('Change settings for this format'); $options['style_plugin']['links']['style_options'] = t('Change settings for this format');
} }
@ -1228,7 +1233,7 @@ abstract class DisplayPluginBase extends PluginBase {
'desc' => t('Change the way each row in the view is styled.'), 'desc' => t('Change the way each row in the view is styled.'),
); );
// This adds a 'Settings' link to the row_options setting if the row style has options. // This adds a 'Settings' link to the row_options setting if the row style has options.
if (!empty($row_plugin['uses_options'])) { if ($row_plugin_instance->usesOptions()) {
$options['row_plugin']['links']['row_options'] = t('Change settings for this style'); $options['row_plugin']['links']['row_options'] = t('Change settings for this style');
} }
} }
@ -1278,7 +1283,7 @@ abstract class DisplayPluginBase extends PluginBase {
$options['pager']['title'] = t('Items to display'); $options['pager']['title'] = t('Items to display');
} }
if (!empty($pager_plugin->definition['uses_options'])) { if ($pager_plugin->usesOptions()) {
$options['pager']['links']['pager_options'] = t('Change settings for this pager type.'); $options['pager']['links']['pager_options'] = t('Change settings for this pager type.');
} }
@ -1340,7 +1345,7 @@ abstract class DisplayPluginBase extends PluginBase {
'desc' => t('Specify access control type for this display.'), 'desc' => t('Specify access control type for this display.'),
); );
if (!empty($access_plugin->definition['uses_options'])) { if ($access_plugin->usesOptions()) {
$options['access']['links']['access_options'] = t('Change settings for this access type.'); $options['access']['links']['access_options'] = t('Change settings for this access type.');
} }
@ -1360,11 +1365,11 @@ abstract class DisplayPluginBase extends PluginBase {
'desc' => t('Specify caching type for this display.'), 'desc' => t('Specify caching type for this display.'),
); );
if (!empty($cache_plugin->definition['uses_options'])) { if ($cache_plugin->usesOptions()) {
$options['cache']['links']['cache_options'] = t('Change settings for this caching type.'); $options['cache']['links']['cache_options'] = t('Change settings for this caching type.');
} }
if (!empty($access_plugin->definition['uses_options'])) { if ($access_plugin->usesOptions()) {
$options['access']['links']['access_options'] = t('Change settings for this access type.'); $options['access']['links']['access_options'] = t('Change settings for this access type.');
} }
@ -1405,7 +1410,7 @@ abstract class DisplayPluginBase extends PluginBase {
'desc' => t('Select the kind of exposed filter to use.'), 'desc' => t('Select the kind of exposed filter to use.'),
); );
if (!empty($exposed_form_plugin->definition['uses_options'])) { if ($exposed_form_plugin->usesOptions()) {
$options['exposed_form']['links']['exposed_form_options'] = t('Exposed form settings for this exposed form style.'); $options['exposed_form']['links']['exposed_form_options'] = t('Exposed form settings for this exposed form style.');
} }
@ -1586,8 +1591,8 @@ abstract class DisplayPluginBase extends PluginBase {
'#default_value' => $access['type'], '#default_value' => $access['type'],
); );
$access_plugin = views_fetch_plugin_data('access', $access['type']); $access_plugin = $this->get_plugin('access');
if (!empty($access_plugin['uses_options'])) { if ($access_plugin->usesOptions()) {
$form['markup'] = array( $form['markup'] = array(
'#prefix' => '<div class="form-item description">', '#prefix' => '<div class="form-item description">',
'#markup' => t('You may also adjust the !settings for the currently selected access restriction.', array('!settings' => $this->option_link(t('settings'), 'access_options'))), '#markup' => t('You may also adjust the !settings for the currently selected access restriction.', array('!settings' => $this->option_link(t('settings'), 'access_options'))),
@ -1629,8 +1634,8 @@ abstract class DisplayPluginBase extends PluginBase {
'#default_value' => $cache['type'], '#default_value' => $cache['type'],
); );
$cache_plugin = views_fetch_plugin_data('cache', $cache['type']); $cache_plugin = $this->get_plugin('cache');
if (!empty($cache_plugin['uses_options'])) { if ($cache_plugin->usesOptions()) {
$form['markup'] = array( $form['markup'] = array(
'#prefix' => '<div class="form-item description">', '#prefix' => '<div class="form-item description">',
'#suffix' => '</div>', '#suffix' => '</div>',
@ -1738,8 +1743,8 @@ abstract class DisplayPluginBase extends PluginBase {
'#description' => t('If the style you choose has settings, be sure to click the settings button that will appear next to it in the View summary.'), '#description' => t('If the style you choose has settings, be sure to click the settings button that will appear next to it in the View summary.'),
); );
$style_plugin = $manager->getDefinition($this->get_option('style_plugin')); $style_plugin = $this->get_plugin('style');
if (!empty($style_plugin['uses_options'])) { if ($style_plugin->usesOptions()) {
$form['markup'] = array( $form['markup'] = array(
'#markup' => '<div class="form-item description">' . t('You may also adjust the !settings for the currently selected style.', array('!settings' => $this->option_link(t('settings'), 'style_options'))) . '</div>', '#markup' => '<div class="form-item description">' . t('You may also adjust the !settings for the currently selected style.', array('!settings' => $this->option_link(t('settings'), 'style_options'))) . '</div>',
); );
@ -1782,8 +1787,8 @@ abstract class DisplayPluginBase extends PluginBase {
'#default_value' => $this->get_option('row_plugin'), '#default_value' => $this->get_option('row_plugin'),
); );
$row_plugin = views_fetch_plugin_data('row', $this->get_option('row_plugin')); $row_plugin = $this->get_plugin('row');
if (!empty($row_plugin['uses_options'])) { if ($row_plugin->usesOptions()) {
$form['markup'] = array( $form['markup'] = array(
'#markup' => '<div class="form-item description">' . t('You may also adjust the !settings for the currently selected row style.', array('!settings' => $this->option_link(t('settings'), 'row_options'))) . '</div>', '#markup' => '<div class="form-item description">' . t('You may also adjust the !settings for the currently selected row style.', array('!settings' => $this->option_link(t('settings'), 'row_options'))) . '</div>',
); );
@ -2137,8 +2142,8 @@ abstract class DisplayPluginBase extends PluginBase {
'#default_value' => $exposed_form['type'], '#default_value' => $exposed_form['type'],
); );
$exposed_form_plugin = views_fetch_plugin_data('exposed_form', $exposed_form['type']); $exposed_form_plugin = $this->get_plugin('exposed_form');
if (!empty($exposed_form_plugin['uses_options'])) { if ($exposed_form_plugin->usesOptions()) {
$form['markup'] = array( $form['markup'] = array(
'#prefix' => '<div class="form-item description">', '#prefix' => '<div class="form-item description">',
'#suffix' => '</div>', '#suffix' => '</div>',
@ -2173,8 +2178,8 @@ abstract class DisplayPluginBase extends PluginBase {
'#default_value' => $pager['type'], '#default_value' => $pager['type'],
); );
$pager_plugin = views_fetch_plugin_data('pager', $pager['type'], array($this->view->base_table)); $pager_plugin = $this->get_plugin('pager');
if (!empty($pager_plugin['uses_options'])) { if ($pager_plugin->usesOptions()) {
$form['markup'] = array( $form['markup'] = array(
'#prefix' => '<div class="form-item description">', '#prefix' => '<div class="form-item description">',
'#suffix' => '</div>', '#suffix' => '</div>',
@ -2333,7 +2338,7 @@ abstract class DisplayPluginBase extends PluginBase {
if ($plugin) { if ($plugin) {
$access = array('type' => $form_state['values']['access']['type']); $access = array('type' => $form_state['values']['access']['type']);
$this->set_option('access', $access); $this->set_option('access', $access);
if (!empty($plugin->definition['uses_options'])) { if ($plugin->usesOptions()) {
views_ui_add_form_to_stack('display', $this->view, $this->display->id, array('access_options')); views_ui_add_form_to_stack('display', $this->view, $this->display->id, array('access_options'));
} }
} }
@ -2354,7 +2359,7 @@ abstract class DisplayPluginBase extends PluginBase {
if ($plugin) { if ($plugin) {
$cache = array('type' => $form_state['values']['cache']['type']); $cache = array('type' => $form_state['values']['cache']['type']);
$this->set_option('cache', $cache); $this->set_option('cache', $cache);
if (!empty($plugin->definition['uses_options'])) { if ($plugin->usesOptions()) {
views_ui_add_form_to_stack('display', $this->view, $this->display->id, array('cache_options')); views_ui_add_form_to_stack('display', $this->view, $this->display->id, array('cache_options'));
} }
} }
@ -2412,7 +2417,7 @@ abstract class DisplayPluginBase extends PluginBase {
$this->set_option('row_options', array()); $this->set_option('row_options', array());
// send ajax form to options page if we use it. // send ajax form to options page if we use it.
if (!empty($plugin->definition['uses_options'])) { if ($plugin->usesOptions()) {
views_ui_add_form_to_stack('display', $this->view, $this->display->id, array('row_options')); views_ui_add_form_to_stack('display', $this->view, $this->display->id, array('row_options'));
} }
} }
@ -2427,7 +2432,7 @@ abstract class DisplayPluginBase extends PluginBase {
$this->set_option($section, $form_state['values'][$section]); $this->set_option($section, $form_state['values'][$section]);
$this->set_option('style_options', array()); $this->set_option('style_options', array());
// send ajax form to options page if we use it. // send ajax form to options page if we use it.
if (!empty($plugin->definition['uses_options'])) { if ($plugin->usesOptions()) {
views_ui_add_form_to_stack('display', $this->view, $this->display->id, array('style_options')); views_ui_add_form_to_stack('display', $this->view, $this->display->id, array('style_options'));
} }
} }
@ -2453,7 +2458,7 @@ abstract class DisplayPluginBase extends PluginBase {
if ($plugin) { if ($plugin) {
$exposed_form = array('type' => $form_state['values']['exposed_form']['type'], 'options' => array()); $exposed_form = array('type' => $form_state['values']['exposed_form']['type'], 'options' => array());
$this->set_option('exposed_form', $exposed_form); $this->set_option('exposed_form', $exposed_form);
if (!empty($plugin->definition['uses_options'])) { if ($plugin->usesOptions()) {
views_ui_add_form_to_stack('display', $this->view, $this->display->id, array('exposed_form_options')); views_ui_add_form_to_stack('display', $this->view, $this->display->id, array('exposed_form_options'));
} }
} }
@ -2480,7 +2485,7 @@ abstract class DisplayPluginBase extends PluginBase {
$pager = array('type' => $form_state['values']['pager']['type'], 'options' => $plugin->options); $pager = array('type' => $form_state['values']['pager']['type'], 'options' => $plugin->options);
$this->set_option('pager', $pager); $this->set_option('pager', $pager);
if (!empty($plugin->definition['uses_options'])) { if ($plugin->usesOptions()) {
views_ui_add_form_to_stack('display', $this->view, $this->display->id, array('pager_options')); views_ui_add_form_to_stack('display', $this->view, $this->display->id, array('pager_options'));
} }
} }

View File

@ -19,7 +19,6 @@ use Drupal\Core\Annotation\Translation;
* id = "basic", * id = "basic",
* title = @Translation("Basic"), * title = @Translation("Basic"),
* help = @Translation("Basic exposed form"), * help = @Translation("Basic exposed form"),
* uses_options = TRUE,
* help_topic = "exposed-form-basic" * help_topic = "exposed-form-basic"
* ) * )
*/ */

View File

@ -24,6 +24,11 @@ use Drupal\views\Plugin\views\PluginBase;
*/ */
abstract class ExposedFormPluginBase extends PluginBase { abstract class ExposedFormPluginBase extends PluginBase {
/**
* Overrides Drupal\views\Plugin\Plugin::$usesOptions.
*/
public $usesOptions = TRUE;
/** /**
* Initialize the plugin. * Initialize the plugin.
* *

View File

@ -19,7 +19,6 @@ use Drupal\Core\Annotation\Translation;
* id = "input_required", * id = "input_required",
* title = @Translation("Input required"), * title = @Translation("Input required"),
* help = @Translation("An exposed form that only renders a view if the form contains user input."), * help = @Translation("An exposed form that only renders a view if the form contains user input."),
* uses_options = TRUE,
* help_topic = "exposed-form-input-required" * help_topic = "exposed-form-input-required"
* ) * )
*/ */

View File

@ -20,8 +20,7 @@ use Drupal\Core\Annotation\Translation;
* title = @Translation("Paged output, full pager"), * title = @Translation("Paged output, full pager"),
* short_title = @Translation("Full"), * short_title = @Translation("Full"),
* help = @Translation("Paged output, full Drupal style"), * help = @Translation("Paged output, full Drupal style"),
* help_topic = "pager-full", * help_topic = "pager-full"
* uses_options = TRUE
* ) * )
*/ */
class Full extends PagerPluginBase { class Full extends PagerPluginBase {

View File

@ -20,8 +20,7 @@ use Drupal\Core\Annotation\Translation;
* title = @Translation("Paged output, mini pager"), * title = @Translation("Paged output, mini pager"),
* short_title = @Translation("Mini"), * short_title = @Translation("Mini"),
* help = @Translation("Use the mini pager output."), * help = @Translation("Use the mini pager output."),
* help_topic = "pager-mini", * help_topic = "pager-mini"
* uses_options = TRUE
* ) * )
*/ */
class Mini extends PagerPluginBase { class Mini extends PagerPluginBase {

View File

@ -20,7 +20,6 @@ use Drupal\Core\Annotation\Translation;
* title = @Translation("Display all items"), * title = @Translation("Display all items"),
* help = @Translation("Display all items that this view might find."), * help = @Translation("Display all items that this view might find."),
* help_topic = "pager-none", * help_topic = "pager-none",
* uses_options = TRUE,
* type = "basic" * type = "basic"
* ) * )
*/ */

View File

@ -26,6 +26,11 @@ abstract class PagerPluginBase extends PluginBase {
var $total_items = 0; var $total_items = 0;
/**
* Overrides Drupal\views\Plugin\Plugin::$usesOptions.
*/
public $usesOptions = TRUE;
/** /**
* Initialize the plugin. * Initialize the plugin.
* *

View File

@ -20,7 +20,6 @@ use Drupal\Core\Annotation\Translation;
* title = @Translation("Display a specified number of items"), * title = @Translation("Display a specified number of items"),
* help = @Translation("Display a limited number items that this view might find."), * help = @Translation("Display a limited number items that this view might find."),
* help_topic = "pager-some", * help_topic = "pager-some",
* uses_options = TRUE,
* type = "basic" * type = "basic"
* ) * )
*/ */

View File

@ -24,7 +24,6 @@ use Drupal\Core\Annotation\Translation;
* help = @Translation("Displays the fields with an optional template."), * help = @Translation("Displays the fields with an optional template."),
* theme = "views_view_fields", * theme = "views_view_fields",
* uses_fields = TRUE, * uses_fields = TRUE,
* uses_options = TRUE,
* type = "normal", * type = "normal",
* help_topic = "style-row-fields" * help_topic = "style-row-fields"
* ) * )

View File

@ -26,6 +26,11 @@ use Drupal\views\Plugin\views\PluginBase;
*/ */
abstract class RowPluginBase extends PluginBase { abstract class RowPluginBase extends PluginBase {
/**
* Overrides Drupal\views\Plugin\Plugin::$usesOptions.
*/
public $usesOptions = TRUE;
/** /**
* Initialize the row plugin. * Initialize the row plugin.
*/ */

View File

@ -19,7 +19,6 @@ use Drupal\Core\Annotation\Translation;
* help = @Translation("Display fields as RSS items."), * help = @Translation("Display fields as RSS items."),
* theme = "views_view_row_rss", * theme = "views_view_row_rss",
* uses_fields = TRUE, * uses_fields = TRUE,
* uses_options = TRUE,
* type = "feed", * type = "feed",
* help_topic = "style-row-fields" * help_topic = "style-row-fields"
* ) * )

View File

@ -24,7 +24,6 @@ use Drupal\Core\Annotation\Translation;
* uses_row_plugin = TRUE, * uses_row_plugin = TRUE,
* uses_row_class = TRUE, * uses_row_class = TRUE,
* uses_grouping = TRUE, * uses_grouping = TRUE,
* uses_options = TRUE,
* type = "normal", * type = "normal",
* help_topic = "style-unformatted" * help_topic = "style-unformatted"
* ) * )

View File

@ -22,7 +22,6 @@ use Drupal\Core\Annotation\Translation;
* help = @Translation("Displays the default summary as a list."), * help = @Translation("Displays the default summary as a list."),
* theme = "views_view_summary", * theme = "views_view_summary",
* type = "summary", * type = "summary",
* uses_options = TRUE,
* help_topic = "style-summary" * help_topic = "style-summary"
* ) * )
*/ */

View File

@ -23,7 +23,6 @@ use Drupal\Core\Annotation\Translation;
* uses_fields = FALSE, * uses_fields = FALSE,
* uses_row_plugin = TRUE, * uses_row_plugin = TRUE,
* uses_row_class = TRUE, * uses_row_class = TRUE,
* uses_options = TRUE,
* type = "normal", * type = "normal",
* help_topic = "style-grid" * help_topic = "style-grid"
* ) * )

View File

@ -22,7 +22,6 @@ use Drupal\Core\Annotation\Translation;
* theme = "views_view_list", * theme = "views_view_list",
* uses_row_plugin = TRUE, * uses_row_plugin = TRUE,
* uses_row_class = TRUE, * uses_row_class = TRUE,
* uses_options = TRUE,
* type = "normal", * type = "normal",
* help_topic = "style-list" * help_topic = "style-list"
* ) * )

View File

@ -21,7 +21,6 @@ use Drupal\Core\Annotation\Translation;
* help = @Translation("Generates an RSS feed from a view."), * help = @Translation("Generates an RSS feed from a view."),
* theme = "views_view_rss", * theme = "views_view_rss",
* uses_row_plugin = TRUE, * uses_row_plugin = TRUE,
* uses_options = TRUE,
* type = "feed", * type = "feed",
* help_topic = "style-rss" * help_topic = "style-rss"
* ) * )

View File

@ -30,6 +30,11 @@ use Drupal\Core\Annotation\Translation;
*/ */
abstract class StylePluginBase extends PluginBase { abstract class StylePluginBase extends PluginBase {
/**
* Overrides Drupal\views\Plugin\Plugin::$usesOptions.
*/
public $usesOptions = TRUE;
/** /**
* Store all available tokens row rows. * Store all available tokens row rows.
*/ */

View File

@ -23,7 +23,6 @@ use Drupal\Core\Annotation\Translation;
* uses_row_plugin = FALSE, * uses_row_plugin = FALSE,
* uses_row_class = TRUE, * uses_row_class = TRUE,
* uses_fields = TRUE, * uses_fields = TRUE,
* uses_options = TRUE,
* type = "normal", * type = "normal",
* help_topic = "style-table" * help_topic = "style-table"
* ) * )

View File

@ -21,7 +21,6 @@ use Drupal\Core\Annotation\Translation;
* help = @Translation("Displays the summary unformatted, with option for one after another or inline."), * help = @Translation("Displays the summary unformatted, with option for one after another or inline."),
* theme = "views_view_summary_unformatted", * theme = "views_view_summary_unformatted",
* type = "summary", * type = "summary",
* uses_options = TRUE,
* help_topic = "style-summary-unformatted" * help_topic = "style-summary-unformatted"
* ) * )
*/ */

View File

@ -20,7 +20,6 @@ use Drupal\Core\Annotation\Translation;
* theme = "views_view_row_rss", * theme = "views_view_row_rss",
* title = @Translation("Aggregator item"), * title = @Translation("Aggregator item"),
* help = @Translation("Display the aggregator item using the data from the original source."), * help = @Translation("Display the aggregator item using the data from the original source."),
* uses_options = TRUE,
* type = "feed", * type = "feed",
* help_topic = "style-aggregator-rss" * help_topic = "style-aggregator-rss"
* ) * )

View File

@ -21,7 +21,6 @@ use Drupal\Core\Annotation\Translation;
* help = @Translation("Display the comment as RSS."), * help = @Translation("Display the comment as RSS."),
* theme = "views_view_row_rss", * theme = "views_view_row_rss",
* base = {"comment"}, * base = {"comment"},
* uses_options = TRUE,
* type = "feed", * type = "feed",
* help_topic = "style-comment-rss" * help_topic = "style-comment-rss"
* ) * )

View File

@ -21,7 +21,6 @@ use Drupal\Core\Annotation\Translation;
* help = @Translation("Display the comment with standard comment view."), * help = @Translation("Display the comment with standard comment view."),
* theme = "views_view_row_comment", * theme = "views_view_row_comment",
* base = {"comment"}, * base = {"comment"},
* uses_options = TRUE,
* type = "normal", * type = "normal",
* help_topic = "style-comment" * help_topic = "style-comment"
* ) * )

View File

@ -22,7 +22,6 @@ use stdClass;
* help = @Translation("Display the content with standard node view."), * help = @Translation("Display the content with standard node view."),
* theme = "views_view_row_rss", * theme = "views_view_row_rss",
* base = {"node"}, * base = {"node"},
* uses_options = TRUE,
* type = "feed", * type = "feed",
* module = "node", * module = "node",
* help_topic = "style-node-rss" * help_topic = "style-node-rss"

View File

@ -24,7 +24,6 @@ use Drupal\views\Plugin\views\row\RowPluginBase;
* title = @Translation("Content"), * title = @Translation("Content"),
* help = @Translation("Display the content with standard node view."), * help = @Translation("Display the content with standard node view."),
* base = {"node"}, * base = {"node"},
* uses_options = TRUE,
* type = "normal", * type = "normal",
* help_topic = "style-node" * help_topic = "style-node"
* ) * )

View File

@ -22,7 +22,6 @@ use Drupal\Core\Annotation\Translation;
* title = @Translation("User"), * title = @Translation("User"),
* help = @Translation("Display the user with standard user view."), * help = @Translation("Display the user with standard user view."),
* base = {"users"}, * base = {"users"},
* uses_options = TRUE,
* type = "normal", * type = "normal",
* help_topic = "style-users" * help_topic = "style-users"
* ) * )

View File

@ -247,7 +247,6 @@
* 'path' => drupal_get_path('module', 'views') . '/modules/node', // not necessary for most modules * 'path' => drupal_get_path('module', 'views') . '/modules/node', // not necessary for most modules
* 'theme' => 'views_view_row_node', * 'theme' => 'views_view_row_node',
* 'base' => array('node'), // only works with 'node' as base. * 'base' => array('node'), // only works with 'node' as base.
* 'uses_options' => TRUE,
* 'type' => 'normal', * 'type' => 'normal',
* ), * ),
* @endcode * @endcode
@ -537,8 +536,6 @@ function hook_views_data_alter(&$data) {
* perspective. * perspective.
* - no_ui: Set to TRUE to denote that the plugin doesn't appear to be * - no_ui: Set to TRUE to denote that the plugin doesn't appear to be
* selectable in the ui, though on the api side they still exists. * selectable in the ui, though on the api side they still exists.
* - uses_options: Set to TRUE to denote that the plugin has an additional
* options form.
* - help: A short help text, wrapped in t() used as description on the plugin settings form. * - help: A short help text, wrapped in t() used as description on the plugin settings form.
* - help topic: The name of an entry by advanced help for the plugin. * - help topic: The name of an entry by advanced help for the plugin.
* - theme: The name of a theme suggestion to use for the display. * - theme: The name of a theme suggestion to use for the display.