Issue #2003312 by ggroves: Rename Views method row_style_options() to rowStyleOptions().

8.0.x
Alex Pott 2013-05-28 22:53:17 +01:00
parent dc44c6040c
commit 421bee5b4a
4 changed files with 10 additions and 10 deletions

View File

@ -65,9 +65,9 @@ class Comment extends WizardPluginBase {
); );
/** /**
* Overrides Drupal\views\Plugin\views\wizard\WizardPluginBase::row_style_options(). * Overrides Drupal\views\Plugin\views\wizard\WizardPluginBase::rowStyleOptions().
*/ */
protected function row_style_options() { protected function rowStyleOptions() {
$options = array(); $options = array();
$options['comment'] = t('comments'); $options['comment'] = t('comments');
$options['fields'] = t('fields'); $options['fields'] = t('fields');

View File

@ -72,9 +72,9 @@ class Node extends WizardPluginBase {
} }
/** /**
* Overrides Drupal\views\Plugin\views\wizard\WizardPluginBase::row_style_options(). * Overrides Drupal\views\Plugin\views\wizard\WizardPluginBase::rowStyleOptions().
*/ */
protected function row_style_options() { protected function rowStyleOptions() {
$options = array(); $options = array();
$options['teasers'] = t('teasers'); $options['teasers'] = t('teasers');
$options['full_posts'] = t('full posts'); $options['full_posts'] = t('full posts');

View File

@ -71,12 +71,12 @@ class NodeRevision extends WizardPluginBase {
); );
/** /**
* Overrides Drupal\views\Plugin\views\wizard\WizardPluginBase::row_style_options(). * Overrides Drupal\views\Plugin\views\wizard\WizardPluginBase::rowStyleOptions().
* *
* Node revisions do not support full posts or teasers, so remove them. * Node revisions do not support full posts or teasers, so remove them.
*/ */
protected function row_style_options() { protected function rowStyleOptions() {
$options = parent::row_style_options(); $options = parent::rowStyleOptions();
unset($options['teasers']); unset($options['teasers']);
unset($options['full_posts']); unset($options['full_posts']);
return $options; return $options;

View File

@ -510,7 +510,7 @@ abstract class WizardPluginBase extends PluginBase implements WizardInterface {
$style = $style_form['style_plugin']['#default_value']; $style = $style_form['style_plugin']['#default_value'];
$style_plugin = Views::pluginManager('style')->createInstance($style); $style_plugin = Views::pluginManager('style')->createInstance($style);
if (isset($style_plugin) && $style_plugin->usesRowPlugin()) { if (isset($style_plugin) && $style_plugin->usesRowPlugin()) {
$options = $this->row_style_options(); $options = $this->rowStyleOptions();
$style_form['row_plugin'] = array( $style_form['row_plugin'] = array(
'#type' => 'select', '#type' => 'select',
'#title' => t('of'), '#title' => t('of'),
@ -542,7 +542,7 @@ abstract class WizardPluginBase extends PluginBase implements WizardInterface {
* @return array * @return array
* Returns the plugin names available for the base table of the wizard. * Returns the plugin names available for the base table of the wizard.
*/ */
protected function row_style_options() { protected function rowStyleOptions() {
// Get all available row plugins by default. // Get all available row plugins by default.
$options = views_fetch_plugin_names('row', 'normal', array($this->base_table)); $options = views_fetch_plugin_names('row', 'normal', array($this->base_table));
return $options; return $options;
@ -962,7 +962,7 @@ abstract class WizardPluginBase extends PluginBase implements WizardInterface {
$display_options['style'] = array('type' => $page['style']['style_plugin']); $display_options['style'] = array('type' => $page['style']['style_plugin']);
// Not every style plugin supports row style plugins. // Not every style plugin supports row style plugins.
// Make sure that the selected row plugin is a valid one. // Make sure that the selected row plugin is a valid one.
$options = $this->row_style_options(); $options = $this->rowStyleOptions();
$display_options['row'] = array('type' => (isset($page['style']['row_plugin']) && isset($options[$page['style']['row_plugin']])) ? $page['style']['row_plugin'] : 'fields'); $display_options['row'] = array('type' => (isset($page['style']['row_plugin']) && isset($options[$page['style']['row_plugin']])) ? $page['style']['row_plugin'] : 'fields');
// If the specific 0 items per page, use no pager. // If the specific 0 items per page, use no pager.