Commit 421bee5b authored by alexpott's avatar alexpott

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

parent dc44c604
......@@ -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['comment'] = t('comments');
$options['fields'] = t('fields');
......
......@@ -72,9 +72,9 @@ public function getAvailableSorts() {
}
/**
* 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['teasers'] = t('teasers');
$options['full_posts'] = t('full posts');
......
......@@ -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.
*/
protected function row_style_options() {
$options = parent::row_style_options();
protected function rowStyleOptions() {
$options = parent::rowStyleOptions();
unset($options['teasers']);
unset($options['full_posts']);
return $options;
......
......@@ -510,7 +510,7 @@ protected function build_form_style(array &$form, array &$form_state, $type) {
$style = $style_form['style_plugin']['#default_value'];
$style_plugin = Views::pluginManager('style')->createInstance($style);
if (isset($style_plugin) && $style_plugin->usesRowPlugin()) {
$options = $this->row_style_options();
$options = $this->rowStyleOptions();
$style_form['row_plugin'] = array(
'#type' => 'select',
'#title' => t('of'),
......@@ -542,7 +542,7 @@ protected function build_form_style(array &$form, array &$form_state, $type) {
* @return array
* 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.
$options = views_fetch_plugin_names('row', 'normal', array($this->base_table));
return $options;
......@@ -962,7 +962,7 @@ protected function page_display_options(array $form, array &$form_state) {
$display_options['style'] = array('type' => $page['style']['style_plugin']);
// Not every style plugin supports row style plugins.
// 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');
// If the specific 0 items per page, use no pager.
......
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