Issue #1762662 by dawehner, tim.plunkett: Cleanup methods on DisplayPluginBase.

8.0.x
Daniel Wehner 2012-08-30 11:23:13 +02:00 committed by Tim Plunkett
parent ebaa0f1cde
commit 3905c51ad3
67 changed files with 715 additions and 713 deletions

View File

@ -127,7 +127,7 @@ function views_ui_preview($view, $display_id, $args = array()) {
$view->setArguments($args);
// Store the current view URL for later use:
if ($view->display_handler->get_option('path')) {
if ($view->display_handler->getOption('path')) {
$path = $view->getUrl();
}
@ -682,8 +682,8 @@ function views_ui_add_form_save_submit($form, &$form_state) {
$form_state['redirect'] = 'admin/structure/views';
if (!empty($view->display['page'])) {
$display = $view->display['page'];
if ($display->handler->has_path()) {
$one_path = $display->handler->get_option('path');
if ($display->handler->hasPath()) {
$one_path = $display->handler->getOption('path');
if (strpos($one_path, '%') === FALSE) {
$form_state['redirect'] = $one_path; // PATH TO THE VIEW IF IT HAS ONE
return;
@ -1075,7 +1075,7 @@ function views_ui_edit_form($form, &$form_state, $view, $display_id = NULL) {
$form['displays']['settings']['tab_title']['#markup'] = '<h2 id="edit-display-settings-title" class="ctools-collapsible-handle">' . t('@display_title details', array('@display_title' => ucwords($display_title))) . '</h2>';
// Add a text that the display is disabled.
if (!empty($view->display[$display_id]->handler)) {
$enabled = $view->display[$display_id]->handler->get_option('enabled');
$enabled = $view->display[$display_id]->handler->getOption('enabled');
if (empty($enabled)) {
$form['displays']['settings']['disabled']['#markup'] = t('This display is disabled.');
}
@ -1351,8 +1351,8 @@ function views_ui_edit_form_submit_undo_delete_display($form, &$form_state) {
*/
function views_ui_edit_form_submit_enable_display($form, &$form_state) {
$id = $form_state['display_id'];
// set_option doesn't work because this would might affect upper displays
$form_state['view']->display[$id]->handler->set_option('enabled', TRUE);
// setOption doesn't work because this would might affect upper displays
$form_state['view']->display[$id]->handler->setOption('enabled', TRUE);
// Store in cache
views_ui_cache_set($form_state['view']);
@ -1366,7 +1366,7 @@ function views_ui_edit_form_submit_enable_display($form, &$form_state) {
*/
function views_ui_edit_form_submit_disable_display($form, &$form_state) {
$id = $form_state['display_id'];
$form_state['view']->display[$id]->handler->set_option('enabled', FALSE);
$form_state['view']->display[$id]->handler->setOption('enabled', FALSE);
// Store in cache
views_ui_cache_set($form_state['view']);
@ -1528,8 +1528,8 @@ function views_ui_get_display_tab_details($view, $display) {
$is_display_deleted = !empty($display->deleted);
// The master display cannot be cloned.
$is_default = $display->id == 'default';
// @todo: Figure out why get_option doesn't work here.
$is_enabled = $display->handler->get_option('enabled');
// @todo: Figure out why getOption doesn't work here.
$is_enabled = $display->handler->getOption('enabled');
if (!$is_display_deleted && !$is_default) {
$prefix = '<div class="ctools-no-js ctools-button ctools-dropbutton"><div class="ctools-link"><a href="#" class="ctools-twisty ctools-text">open</a></div><div class="ctools-content"><ul class="horizontal right actions">';
@ -1565,8 +1565,8 @@ function views_ui_get_display_tab_details($view, $display) {
);
}
// Add a link to view the page.
elseif ($display->handler->has_path()) {
$path = $display->handler->get_path();
elseif ($display->handler->hasPath()) {
$path = $display->handler->getPath();
if (strpos($path, '%') === FALSE) {
$build['top']['actions']['path'] = array(
'#type' => 'link',
@ -1623,7 +1623,7 @@ function views_ui_get_display_tab_details($view, $display) {
$build['top']['display_title'] = array(
'#theme' => 'views_ui_display_tab_setting',
'#description' => t('Display name'),
'#link' => $display->handler->option_link(check_plain($display_title), 'display_title'),
'#link' => $display->handler->optionLink(check_plain($display_title), 'display_title'),
);
}
@ -1664,7 +1664,7 @@ function views_ui_get_display_tab_details($view, $display) {
// Fetch options from the display plugin, with a list of buckets they go into.
$options = array();
$display->handler->options_summary($buckets, $options);
$display->handler->optionsSummary($buckets, $options);
// Place each option into its bucket.
foreach ($options as $id => $option) {
@ -1725,12 +1725,12 @@ function views_ui_edit_form_get_build_from_option($id, $option, $view, $display)
$option_build['#description'] = $option['title'];
$option_build['#link'] = $display->handler->option_link($option['value'], $id, '', empty($option['desc']) ? '' : $option['desc']);
$option_build['#link'] = $display->handler->optionLink($option['value'], $id, '', empty($option['desc']) ? '' : $option['desc']);
$option_build['#links'] = array();
if (!empty($option['links']) && is_array($option['links'])) {
foreach ($option['links'] as $link_id => $link_value) {
$option_build['#settings_links'][] = $display->handler->option_link($option['setting'], $link_id, 'views-button-configure', $link_value);
$option_build['#settings_links'][] = $display->handler->optionLink($option['setting'], $link_id, 'views-button-configure', $link_value);
}
}
@ -1740,8 +1740,8 @@ function views_ui_edit_form_get_build_from_option($id, $option, $view, $display)
}
else {
$display_id = $display->id;
if (!$display->handler->is_default_display()) {
if ($display->handler->defaultable_sections($id)) {
if (!$display->handler->isDefaultDisplay()) {
if ($display->handler->defaultableSections($id)) {
$option_build['#overridden'] = TRUE;
}
}
@ -2013,21 +2013,21 @@ function views_ui_import_validate($form, &$form_state) {
continue;
}
$plugin = views_get_plugin('style', $display->handler->get_option('style_plugin'));
$plugin = views_get_plugin('style', $display->handler->getOption('style_plugin'));
if (!$plugin) {
drupal_set_message(t('Style plugin @plugin is not available.', array('@plugin' => $display->handler->get_option('style_plugin'))), 'error');
drupal_set_message(t('Style plugin @plugin is not available.', array('@plugin' => $display->handler->getOption('style_plugin'))), 'error');
$broken = TRUE;
}
elseif ($plugin->usesRowPlugin()) {
$plugin = views_get_plugin('row', $display->handler->get_option('row_plugin'));
$plugin = views_get_plugin('row', $display->handler->getOption('row_plugin'));
if (!$plugin) {
drupal_set_message(t('Row plugin @plugin is not available.', array('@plugin' => $display->handler->get_option('row_plugin'))), 'error');
drupal_set_message(t('Row plugin @plugin is not available.', array('@plugin' => $display->handler->getOption('row_plugin'))), 'error');
$broken = TRUE;
}
}
foreach (View::viewsObjectTypes() as $type => $info) {
$handlers = $display->handler->get_handlers($type);
$handlers = $display->handler->getHandlers($type);
if ($handlers) {
foreach ($handlers as $id => $handler) {
if ($handler->broken()) {
@ -2172,7 +2172,7 @@ function views_ui_edit_form_get_bucket($type, $view, $display) {
break;
case 'field':
// Fetch the style plugin info so we know whether to list fields or not.
$style_plugin = $display->handler->get_plugin();
$style_plugin = $display->handler->getPlugin();
$uses_fields = $style_plugin && $style_plugin->usesFields();
if (!$uses_fields) {
$build['fields'][] = array(
@ -2191,7 +2191,7 @@ function views_ui_edit_form_get_bucket($type, $view, $display) {
// Create an array of actions to pass to theme_links
$actions = array();
$count_handlers = count($display->handler->get_handlers($type));
$count_handlers = count($display->handler->getHandlers($type));
$actions['add'] = array(
'title' => t('Add'),
'href' => "admin/structure/views/nojs/add-item/$view->name/$display->id/$type",
@ -2218,8 +2218,8 @@ function views_ui_edit_form_get_bucket($type, $view, $display) {
)
);
if (!$display->handler->is_default_display()) {
if (!$display->handler->is_defaulted($types[$type]['plural'])) {
if (!$display->handler->isDefaultDisplay()) {
if (!$display->handler->isDefaulted($types[$type]['plural'])) {
$build['#overridden'] = TRUE;
}
else {
@ -2236,11 +2236,11 @@ function views_ui_edit_form_get_bucket($type, $view, $display) {
if (!isset($relationships)) {
// Get relationship labels
$relationships = array();
// @todo: get_handlers()
$handlers = $display->handler->get_option('relationships');
// @todo: getHandlers()
$handlers = $display->handler->getOption('relationships');
if ($handlers) {
foreach ($handlers as $id => $info) {
$handler = $display->handler->get_handler('relationship', $id);
$handler = $display->handler->getHandler('relationship', $id);
$relationships[$id] = $handler->label();
}
}
@ -2250,7 +2250,7 @@ function views_ui_edit_form_get_bucket($type, $view, $display) {
$groups = array();
$grouping = FALSE;
if ($type == 'filter') {
$group_info = $view->display_handler->get_option('filter_groups');
$group_info = $view->display_handler->getOption('filter_groups');
// If there is only one group but it is using the "OR" filter, we still
// treat it as a group for display purposes, since we want to display the
// "OR" label next to items within the group.
@ -2262,12 +2262,12 @@ function views_ui_edit_form_get_bucket($type, $view, $display) {
$build['fields'] = array();
foreach ($display->handler->get_option($types[$type]['plural']) as $id => $field) {
foreach ($display->handler->getOption($types[$type]['plural']) as $id => $field) {
// Build the option link for this handler ("Node: ID = article").
$build['fields'][$id] = array();
$build['fields'][$id]['#theme'] = 'views_ui_display_tab_setting';
$handler = $display->handler->get_handler($type, $id);
$handler = $display->handler->getHandler($type, $id);
if (empty($handler)) {
$build['fields'][$id]['#class'][] = 'broken';
$field_name = t('Broken/missing handler: @table > @field', array('@table' => $field['table'], '@field' => $field['field']));
@ -2293,7 +2293,7 @@ function views_ui_edit_form_get_bucket($type, $view, $display) {
$build['fields'][$id]['#changed'] = TRUE;
}
if ($display->handler->use_group_by() && $handler->use_group_by()) {
if ($display->handler->useGroupBy() && $handler->use_group_by()) {
$build['fields'][$id]['#settings_links'][] = l('<span class="label">' . t('Aggregation settings') . '</span>', "admin/structure/views/nojs/config-item-group/$view->name/$display->id/$type/$id", array('attributes' => array('class' => 'views-button-configure views-ajax-link', 'title' => t('Aggregation settings')), 'html' => TRUE));
}
@ -2498,7 +2498,7 @@ function views_ui_standard_submit($form, &$form_state) {
if ($revert) {
// If it's revert just change the override and return.
$display = &$form_state['view']->display[$form_state['display_id']];
$display->handler->options_override($form, $form_state);
$display->handler->optionsOverride($form, $form_state);
// Don't execute the normal submit handling but still store the changed view into cache.
views_ui_cache_set($form_state['view']);
@ -2512,8 +2512,8 @@ function views_ui_standard_submit($form, &$form_state) {
// We were using the default display's values, but we're now overriding
// the default display and saving values specific to this display.
$display = &$form_state['view']->display[$form_state['display_id']];
// options_override toggles the override of this section.
$display->handler->options_override($form, $form_state);
// optionsOverride toggles the override of this section.
$display->handler->optionsOverride($form, $form_state);
$display->handler->options_submit($form, $form_state);
}
elseif (!$was_defaulted && $is_defaulted) {
@ -2522,8 +2522,8 @@ function views_ui_standard_submit($form, &$form_state) {
// Overwrite the default display with the current form values, and make
// the current display use the new default values.
$display = &$form_state['view']->display[$form_state['display_id']];
// options_override toggles the override of this section.
$display->handler->options_override($form, $form_state);
// optionsOverride toggles the override of this section.
$display->handler->optionsOverride($form, $form_state);
$display->handler->options_submit($form, $form_state);
}
@ -2592,18 +2592,18 @@ function views_ui_standard_display_dropdown(&$form, &$form_state, $section) {
$form['progress']['#weight'] = -1001;
}
if ($current_display->handler->is_default_display()) {
if ($current_display->handler->isDefaultDisplay()) {
return;
}
// Determine whether any other displays have overrides for this section.
$section_overrides = FALSE;
$section_defaulted = $current_display->handler->is_defaulted($section);
$section_defaulted = $current_display->handler->isDefaulted($section);
foreach ($displays as $id => $display) {
if ($id === 'default' || $id === $display_id) {
continue;
}
if ($display->handler && !$display->handler->is_defaulted($section)) {
if ($display->handler && !$display->handler->isDefaulted($section)) {
$section_overrides = TRUE;
}
}
@ -2626,7 +2626,7 @@ function views_ui_standard_display_dropdown(&$form, &$form_state, $section) {
'#title' => t('For'), // @TODO: Translators may need more context than this.
'#options' => $display_dropdown,
);
if ($current_display->handler->is_defaulted($section)) {
if ($current_display->handler->isDefaulted($section)) {
$form['override']['dropdown']['#default_value'] = 'defaults';
}
else {
@ -3261,7 +3261,7 @@ function views_ui_edit_display_form_submit($form, &$form_state) {
*/
function views_ui_edit_display_form_override($form, &$form_state) {
$display = &$form_state['view']->display[$form_state['display_id']];
$display->handler->options_override($form, $form_state);
$display->handler->optionsOverride($form, $form_state);
views_ui_cache_set($form_state['view']);
$form_state['rerender'] = TRUE;
@ -3284,7 +3284,7 @@ function views_ui_config_type_form($form, &$form_state) {
$form['#title'] = t('Configure @type', array('@type' => $types[$type]['ltitle']));
$form['#section'] = $display_id . 'config-item';
if ($display->handler->defaultable_sections($types[$type]['plural'])) {
if ($display->handler->defaultableSections($types[$type]['plural'])) {
$form_state['section'] = $types[$type]['plural'];
views_ui_standard_display_dropdown($form, $form_state, $form_state['section']);
}
@ -3331,7 +3331,7 @@ function views_ui_rearrange_form($form, &$form_state) {
$form['#title'] = t('Rearrange @type', array('@type' => $types[$type]['ltitle']));
$form['#section'] = $display_id . 'rearrange-item';
if ($display->handler->defaultable_sections($types[$type]['plural'])) {
if ($display->handler->defaultableSections($types[$type]['plural'])) {
$form_state['section'] = $types[$type]['plural'];
views_ui_standard_display_dropdown($form, $form_state, $form_state['section']);
}
@ -3340,12 +3340,12 @@ function views_ui_rearrange_form($form, &$form_state) {
// Get relationship labels
$relationships = array();
foreach ($display->handler->get_handlers('relationship') as $id => $handler) {
foreach ($display->handler->getHandlers('relationship') as $id => $handler) {
$relationships[$id] = $handler->label();
$handlers = $display->handler->get_option('relationships');
$handlers = $display->handler->getOption('relationships');
if ($handlers) {
foreach ($handlers as $id => $info) {
$handler = $display->handler->get_handler('relationship', $id);
$handler = $display->handler->getHandler('relationship', $id);
$relationships[$id] = $handler->label();
}
}
@ -3355,20 +3355,20 @@ function views_ui_rearrange_form($form, &$form_state) {
$groups = array();
$grouping = FALSE;
if ($type == 'filter') {
$group_info = $view->display_handler->get_option('filter_groups');
$group_info = $view->display_handler->getOption('filter_groups');
if (!empty($group_info['groups']) && count($group_info['groups']) > 1) {
$grouping = TRUE;
$groups = array(0 => array());
}
}
foreach ($display->handler->get_option($types[$type]['plural']) as $id => $field) {
foreach ($display->handler->getOption($types[$type]['plural']) as $id => $field) {
$form['fields'][$id] = array('#tree' => TRUE);
$form['fields'][$id]['weight'] = array(
'#type' => 'textfield',
'#default_value' => ++$count,
);
$handler = $display->handler->get_handler($type, $id);
$handler = $display->handler->getHandler($type, $id);
if ($handler) {
$name = $handler->ui_name() . ' ' . $handler->admin_summary();
if (!empty($field['relationship']) && !empty($relationships[$field['relationship']])) {
@ -3558,7 +3558,7 @@ function views_ui_rearrange_form_submit($form, &$form_state) {
$types = View::viewsObjectTypes();
$display = &$form_state['view']->display[$form_state['display_id']];
$old_fields = $display->handler->get_option($types[$form_state['type']]['plural']);
$old_fields = $display->handler->getOption($types[$form_state['type']]['plural']);
$new_fields = $order = array();
// Make an array with the weights
@ -3577,7 +3577,7 @@ function views_ui_rearrange_form_submit($form, &$form_state) {
foreach (array_keys($order) as $field) {
$new_fields[$field] = $old_fields[$field];
}
$display->handler->set_option($types[$form_state['type']]['plural'], $new_fields);
$display->handler->setOption($types[$form_state['type']]['plural'], $new_fields);
// Store in cache
views_ui_cache_set($form_state['view']);
@ -3600,7 +3600,7 @@ function views_ui_rearrange_filter_form($form, &$form_state) {
$form['#title'] .= t('Rearrange @type', array('@type' => $types[$type]['ltitle']));
$form['#section'] = $display_id . 'rearrange-item';
if ($display->handler->defaultable_sections($types[$type]['plural'])) {
if ($display->handler->defaultableSections($types[$type]['plural'])) {
$form_state['section'] = $types[$type]['plural'];
views_ui_standard_display_dropdown($form, $form_state, $form_state['section']);
}
@ -3610,14 +3610,14 @@ function views_ui_rearrange_filter_form($form, &$form_state) {
$handlers = $view->form_cache['handlers'];
}
else {
$groups = $display->handler->get_option('filter_groups');
$handlers = $display->handler->get_option($types[$type]['plural']);
$groups = $display->handler->getOption('filter_groups');
$handlers = $display->handler->getOption($types[$type]['plural']);
}
$count = 0;
// Get relationship labels
$relationships = array();
foreach ($display->handler->get_handlers('relationship') as $id => $handler) {
foreach ($display->handler->getHandlers('relationship') as $id => $handler) {
$relationships[$id] = $handler->label();
}
@ -3685,7 +3685,7 @@ function views_ui_rearrange_filter_form($form, &$form_state) {
$form['#group_options'] = $group_options;
$form['#groups'] = $groups;
// We don't use get_handlers() because we want items without handlers to
// We don't use getHandlers() because we want items without handlers to
// appear and show up as 'broken' so that the user can see them.
$form['filters'] = array('#tree' => TRUE);
foreach ($handlers as $id => $field) {
@ -3694,7 +3694,7 @@ function views_ui_rearrange_filter_form($form, &$form_state) {
$field['group'] = 1;
}
$handler = $display->handler->get_handler($type, $id);
$handler = $display->handler->getHandler($type, $id);
if ($grouping && $handler && !$handler->can_group()) {
$field['group'] = 'ungroupable';
}
@ -3865,7 +3865,7 @@ function views_ui_rearrange_filter_form_submit($form, &$form_state) {
$old_fields = $form_state['view']->form_cache['handlers'];
}
else {
$old_fields = $display->handler->get_option($types[$form_state['type']]['plural']);
$old_fields = $display->handler->getOption($types[$form_state['type']]['plural']);
}
$count = 0;
@ -3949,8 +3949,8 @@ function views_ui_rearrange_filter_form_submit($form, &$form_state) {
}
// Write the changed handler values.
$display->handler->set_option($types[$form_state['type']]['plural'], $new_fields);
$display->handler->set_option('filter_groups', $groups);
$display->handler->setOption($types[$form_state['type']]['plural'], $new_fields);
$display->handler->setOption('filter_groups', $groups);
if (isset($form_state['view']->form_cache)) {
unset($form_state['view']->form_cache);
}
@ -3996,7 +3996,7 @@ function views_ui_add_item_form($form, &$form_state) {
// Figure out all the base tables allowed based upon what the relationships provide.
$base_tables = $view->getBaseTables();
$options = views_fetch_fields(array_keys($base_tables), $type, $display->handler->use_group_by());
$options = views_fetch_fields(array_keys($base_tables), $type, $display->handler->useGroupBy());
if (!empty($options)) {
$form['options']['controls'] = array(
@ -4105,8 +4105,8 @@ function views_ui_add_item_form_submit($form, &$form_state) {
// We were using the default display's values, but we're now overriding
// the default display and saving values specific to this display.
$display = &$form_state['view']->display[$form_state['display_id']];
// set_override toggles the override of this section.
$display->handler->set_override($section);
// setOverride toggles the override of this section.
$display->handler->setOverride($section);
}
elseif (!$was_defaulted && $is_defaulted) {
// We used to have an override for this display, but the user now wants
@ -4114,8 +4114,8 @@ function views_ui_add_item_form_submit($form, &$form_state) {
// Overwrite the default display with the current form values, and make
// the current display use the new default values.
$display = &$form_state['view']->display[$form_state['display_id']];
// options_override toggles the override of this section.
$display->handler->set_override($section);
// optionsOverride toggles the override of this section.
$display->handler->setOverride($section);
}
if (!empty($form_state['values']['name']) && is_array($form_state['values']['name'])) {
@ -4135,7 +4135,7 @@ function views_ui_add_item_form_submit($form, &$form_state) {
$key = $types[$type]['type'];
}
$handler = views_get_handler($table, $field, $key);
if ($form_state['view']->display_handler->use_group_by() && $handler->use_group_by()) {
if ($form_state['view']->display_handler->useGroupBy() && $handler->use_group_by()) {
views_ui_add_form_to_stack('config-item-group', $form_state['view'], $form_state['display_id'], array($type, $id));
}
@ -4218,7 +4218,7 @@ function views_ui_config_item_form($form, &$form_state) {
$item = $view->get_item($display_id, $type, $id);
if ($item) {
$handler = $view->display_handler->get_handler($type, $id);
$handler = $view->display_handler->getHandler($type, $id);
if (empty($handler)) {
$form['markup'] = array('#markup' => t("Error: handler for @table > @field doesn't exist!", array('@table' => $item['table'], '@field' => $item['field'])));
}
@ -4227,14 +4227,14 @@ function views_ui_config_item_form($form, &$form_state) {
// If this item can come from the default display, show a dropdown
// that lets the user choose which display the changes should apply to.
if ($view->display_handler->defaultable_sections($types[$type]['plural'])) {
if ($view->display_handler->defaultableSections($types[$type]['plural'])) {
$form_state['section'] = $types[$type]['plural'];
views_ui_standard_display_dropdown($form, $form_state, $form_state['section']);
}
// A whole bunch of code to figure out what relationships are valid for
// this item.
$relationships = $view->display_handler->get_option('relationships');
$relationships = $view->display_handler->getOption('relationships');
$relationship_options = array();
foreach ($relationships as $relationship) {
@ -4252,7 +4252,7 @@ function views_ui_config_item_form($form, &$form_state) {
// If this relationship is valid for this type, add it to the list.
$data = views_fetch_data($relationship['table']);
$base = $data[$relationship['field']]['relationship']['base'];
$base_fields = views_fetch_fields($base, $form_state['type'], $view->display_handler->use_group_by());
$base_fields = views_fetch_fields($base, $form_state['type'], $view->display_handler->useGroupBy());
if (isset($base_fields[$item['table'] . '.' . $item['field']])) {
$relationship_handler->init($view, $relationship);
$relationship_options[$relationship['id']] = $relationship_handler->label();
@ -4262,7 +4262,7 @@ function views_ui_config_item_form($form, &$form_state) {
if (!empty($relationship_options)) {
// Make sure the existing relationship is even valid. If not, force
// it to none.
$base_fields = views_fetch_fields($view->base_table, $form_state['type'], $view->display_handler->use_group_by());
$base_fields = views_fetch_fields($view->base_table, $form_state['type'], $view->display_handler->useGroupBy());
if (isset($base_fields[$item['table'] . '.' . $item['field']])) {
$relationship_options = array_merge(array('none' => t('Do not use a relationship')), $relationship_options);
}
@ -4353,7 +4353,7 @@ function views_ui_config_item_form_submit_temporary($form, &$form_state) {
}
$override = NULL;
if ($form_state['view']->display_handler->use_group_by() && !empty($item['group_type'])) {
if ($form_state['view']->display_handler->useGroupBy() && !empty($item['group_type'])) {
if (empty($form_state['view']->query)) {
$form_state['view']->initQuery();
}
@ -4407,7 +4407,7 @@ function views_ui_config_item_form_submit($form, &$form_state) {
}
$override = NULL;
if ($form_state['view']->display_handler->use_group_by() && !empty($item['group_type'])) {
if ($form_state['view']->display_handler->useGroupBy() && !empty($item['group_type'])) {
if (empty($form_state['view']->query)) {
$form_state['view']->initQuery();
}
@ -4467,7 +4467,7 @@ function views_ui_config_item_group_form($type, &$form_state) {
$item = $view->get_item($display_id, $type, $id);
if ($item) {
$handler = $view->display_handler->get_handler($type, $id);
$handler = $view->display_handler->getHandler($type, $id);
if (empty($handler)) {
$form['markup'] = array('#markup' => t("Error: handler for @table > @field doesn't exist!", array('@table' => $item['table'], '@field' => $item['field'])));
}
@ -4515,7 +4515,7 @@ function views_ui_config_item_form_remove($form, &$form_state) {
// If the display selection was changed toggle the override value.
if ($was_defaulted != $is_defaulted) {
$display =& $form_state['view']->display[$form_state['display_id']];
$display->handler->options_override($form, $form_state);
$display->handler->optionsOverride($form, $form_state);
}
$form_state['view']->set_item($form_state['display_id'], $form_state['type'], $form_state['id'], NULL);
@ -4568,7 +4568,7 @@ function views_ui_config_item_extra_form($form, &$form_state) {
$item = $view->get_item($display_id, $type, $id);
if ($item) {
$handler = $view->display_handler->get_handler($type, $id);
$handler = $view->display_handler->getHandler($type, $id);
if (empty($handler)) {
$form['markup'] = array('#markup' => t("Error: handler for @table > @field doesn't exist!", array('@table' => $item['table'], '@field' => $item['field'])));
}

View File

@ -67,7 +67,7 @@ function views_ajax() {
// Override the display's pager_element with the one actually used.
if (isset($pager_element)) {
$commands[] = views_ajax_command_scroll_top('.view-dom-id-' . $dom_id);
$view->display[$display_id]->handler->set_option('pager_element', $pager_element);
$view->display[$display_id]->handler->setOption('pager_element', $pager_element);
}
// Reuse the same DOM id so it matches that in Drupal.settings.
$view->dom_id = $dom_id;

View File

@ -27,7 +27,7 @@ function views_ui_views_analyze($view) {
if (empty($display->handler)) {
continue;
}
if ($display->handler->has_path() && $path = $display->handler->get_option('path')) {
if ($display->handler->hasPath() && $path = $display->handler->getOption('path')) {
$normal_path = drupal_get_normal_path($path);
if ($path != $normal_path) {
$ret[] = Analyzer::formatMessage(t('You have configured display %display with a path which is an path alias as well. This might lead to unwanted effects so better use an internal path.', array('%display' => $display->display_title)), 'warning');

View File

@ -99,7 +99,7 @@ abstract class HandlerBase extends PluginBase {
if (isset($types[$this->plugin_type]['plural'])) {
$plural = $types[$this->plugin_type]['plural'];
}
if ($this->view->display_handler->is_defaulted($plural)) {
if ($this->view->display_handler->isDefaulted($plural)) {
$display_id = 'default';
}
@ -178,7 +178,7 @@ abstract class HandlerBase extends PluginBase {
}
// If grouping, check to see if the aggregation method needs to modify the field.
if ($this->view->display_handler->use_group_by()) {
if ($this->view->display_handler->useGroupBy()) {
$this->view->initQuery();
if ($this->query) {
$info = $this->query->get_aggregation_info();

View File

@ -35,7 +35,7 @@ abstract class AccessPluginBase extends PluginBase {
$this->display = &$display;
if (is_object($display->handler)) {
$options = $display->handler->get_option('access');
$options = $display->handler->getOption('access');
// Overlay incoming options on top of defaults
$this->unpack_options($this->options, $options);
}

View File

@ -48,12 +48,12 @@ class Text extends AreaPluginBase {
// Get a list of the available fields and arguments for token replacement.
$options = array();
foreach ($this->view->display_handler->get_handlers('field') as $field => $handler) {
foreach ($this->view->display_handler->getHandlers('field') as $field => $handler) {
$options[t('Fields')]["[$field]"] = $handler->ui_name();
}
$count = 0; // This lets us prepare the key as we want it printed.
foreach ($this->view->display_handler->get_handlers('argument') as $arg => $handler) {
foreach ($this->view->display_handler->getHandlers('argument') as $arg => $handler) {
$options[t('Arguments')]['%' . ++$count] = t('@argument title', array('@argument' => $handler->ui_name()));
$options[t('Arguments')]['!' . $count] = t('@argument input', array('@argument' => $handler->ui_name()));
}

View File

@ -160,7 +160,7 @@ abstract class ArgumentPluginBase extends HandlerBase {
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$argument_text = $this->view->display_handler->get_argument_text();
$argument_text = $this->view->display_handler->getArgumentText();
$form['#pre_render'][] = 'views_ui_pre_render_move_argument_options';
@ -479,7 +479,7 @@ abstract class ArgumentPluginBase extends HandlerBase {
),
);
if ($this->view->display_handler->has_path()) {
if ($this->view->display_handler->hasPath()) {
$defaults['not found']['title'] = t('Show "Page not found"');
}
@ -851,7 +851,7 @@ abstract class ArgumentPluginBase extends HandlerBase {
*/
function summary_basics($count_field = TRUE) {
// Add the number of nodes counter
$distinct = ($this->view->display_handler->get_option('distinct') && empty($this->query->no_distinct));
$distinct = ($this->view->display_handler->getOption('distinct') && empty($this->query->no_distinct));
$count_alias = $this->query->add_field($this->query->base_table, $this->query->base_field, 'num_records', array('count' => TRUE, 'distinct' => $distinct));
$this->query->add_groupby($this->name_alias);

View File

@ -64,7 +64,7 @@ abstract class CachePluginBase extends PluginBase {
$this->display = &$display;
if (is_object($display->handler)) {
$options = $display->handler->get_option('cache');
$options = $display->handler->getOption('cache');
// Overlay incoming options on top of defaults
$this->unpack_options($this->options, $options);
}
@ -274,7 +274,7 @@ abstract class CachePluginBase extends PluginBase {
$build_info = $this->view->build_info;
$query_plugin = $this->view->display_handler->get_plugin('query');
$query_plugin = $this->view->display_handler->getPlugin('query');
foreach (array('query', 'count_query') as $index) {
// If the default query back-end is used generate SQL query strings from

View File

@ -49,11 +49,11 @@ class Attachment extends DisplayPluginBase {
return $options;
}
function execute() {
public function execute() {
return $this->view->render($this->display->id);
}
function attachment_positions($position = NULL) {
public function attachmentPositions($position = NULL) {
$positions = array(
'before' => t('Before'),
'after' => t('After'),
@ -72,9 +72,9 @@ class Attachment extends DisplayPluginBase {
*
* This output is returned as an array.
*/
function options_summary(&$categories, &$options) {
public function optionsSummary(&$categories, &$options) {
// It is very important to call the parent function here:
parent::options_summary($categories, $options);
parent::optionsSummary($categories, $options);
$categories['attachment'] = array(
'title' => t('Attachment settings'),
@ -84,7 +84,7 @@ class Attachment extends DisplayPluginBase {
),
);
$displays = array_filter($this->get_option('displays'));
$displays = array_filter($this->getOption('displays'));
if (count($displays) > 1) {
$attach_to = t('Multiple displays');
}
@ -108,31 +108,31 @@ class Attachment extends DisplayPluginBase {
$options['attachment_position'] = array(
'category' => 'attachment',
'title' => t('Attachment position'),
'value' => $this->attachment_positions($this->get_option('attachment_position')),
'value' => $this->attachmentPositions($this->getOption('attachment_position')),
);
$options['inherit_arguments'] = array(
'category' => 'attachment',
'title' => t('Inherit contextual filters'),
'value' => $this->get_option('inherit_arguments') ? t('Yes') : t('No'),
'value' => $this->getOption('inherit_arguments') ? t('Yes') : t('No'),
);
$options['inherit_exposed_filters'] = array(
'category' => 'attachment',
'title' => t('Inherit exposed filters'),
'value' => $this->get_option('inherit_exposed_filters') ? t('Yes') : t('No'),
'value' => $this->getOption('inherit_exposed_filters') ? t('Yes') : t('No'),
);
$options['inherit_pager'] = array(
'category' => 'pager',
'title' => t('Inherit pager'),
'value' => $this->get_option('inherit_pager') ? t('Yes') : t('No'),
'value' => $this->getOption('inherit_pager') ? t('Yes') : t('No'),
);
$options['render_pager'] = array(
'category' => 'pager',
'title' => t('Render pager'),
'value' => $this->get_option('render_pager') ? t('Yes') : t('No'),
'value' => $this->getOption('render_pager') ? t('Yes') : t('No'),
);
}
@ -140,7 +140,7 @@ class Attachment extends DisplayPluginBase {
/**
* Provide the default form for setting options.
*/
function options_form(&$form, &$form_state) {
public function options_form(&$form, &$form_state) {
// It is very important to call the parent function here:
parent::options_form($form, $form_state);
@ -151,7 +151,7 @@ class Attachment extends DisplayPluginBase {
'#type' => 'checkbox',
'#title' => t('Inherit'),
'#description' => t('Should this display inherit its contextual filter values from the parent display to which it is attached?'),
'#default_value' => $this->get_option('inherit_arguments'),
'#default_value' => $this->getOption('inherit_arguments'),
);
break;
case 'inherit_exposed_filters':
@ -160,7 +160,7 @@ class Attachment extends DisplayPluginBase {
'#type' => 'checkbox',
'#title' => t('Inherit'),
'#description' => t('Should this display inherit its exposed filter values from the parent display to which it is attached?'),
'#default_value' => $this->get_option('inherit_exposed_filters'),
'#default_value' => $this->getOption('inherit_exposed_filters'),
);
break;
case 'inherit_pager':
@ -169,7 +169,7 @@ class Attachment extends DisplayPluginBase {
'#type' => 'checkbox',
'#title' => t('Inherit'),
'#description' => t('Should this display inherit its paging values from the parent display to which it is attached?'),
'#default_value' => $this->get_option('inherit_pager'),
'#default_value' => $this->getOption('inherit_pager'),
);
break;
case 'render_pager':
@ -178,7 +178,7 @@ class Attachment extends DisplayPluginBase {
'#type' => 'checkbox',
'#title' => t('Render'),
'#description' => t('Should this display render the pager values? This is only meaningful if inheriting a pager.'),
'#default_value' => $this->get_option('render_pager'),
'#default_value' => $this->getOption('render_pager'),
);
break;
case 'attachment_position':
@ -186,8 +186,8 @@ class Attachment extends DisplayPluginBase {
$form['attachment_position'] = array(
'#type' => 'radios',
'#description' => t('Attach before or after the parent display?'),
'#options' => $this->attachment_positions(),
'#default_value' => $this->get_option('attachment_position'),
'#options' => $this->attachmentPositions(),
'#default_value' => $this->getOption('attachment_position'),
);
break;
case 'displays':
@ -202,7 +202,7 @@ class Attachment extends DisplayPluginBase {
'#type' => 'checkboxes',
'#description' => t('Select which display or displays this should attach to.'),
'#options' => $displays,
'#default_value' => $this->get_option('displays'),
'#default_value' => $this->getOption('displays'),
);
break;
}
@ -212,7 +212,7 @@ class Attachment extends DisplayPluginBase {
* Perform any necessary changes to the form values prior to storage.
* There is no need for this function to actually store the data.
*/
function options_submit(&$form, &$form_state) {
public function options_submit(&$form, &$form_state) {
// It is very important to call the parent function here:
parent::options_submit($form, $form_state);
switch ($form_state['section']) {
@ -222,7 +222,7 @@ class Attachment extends DisplayPluginBase {
case 'inherit_exposed_filters':
case 'attachment_position':
case 'displays':
$this->set_option($form_state['section'], $form_state['values'][$form_state['section']]);
$this->setOption($form_state['section'], $form_state['values'][$form_state['section']]);
break;
}
}
@ -230,8 +230,8 @@ class Attachment extends DisplayPluginBase {
/**
* Attach to another view.
*/
function attach_to($display_id) {
$displays = $this->get_option('displays');
public function attachTo($display_id) {
$displays = $this->getOption('displays');
if (empty($displays[$display_id])) {
return;
@ -246,17 +246,17 @@ class Attachment extends DisplayPluginBase {
$view = $this->view->cloneView();
$view->original_args = $view->args;
$args = $this->get_option('inherit_arguments') ? $this->view->args : array();
$args = $this->getOption('inherit_arguments') ? $this->view->args : array();
$view->setArguments($args);
$view->setDisplay($this->display->id);
if ($this->get_option('inherit_pager')) {
if ($this->getOption('inherit_pager')) {
$view->display_handler->usesPager = $this->view->display[$display_id]->handler->usesPager();
$view->display_handler->set_option('pager', $this->view->display[$display_id]->handler->get_option('pager'));
$view->display_handler->setOption('pager', $this->view->display[$display_id]->handler->getOption('pager'));
}
$attachment = $view->executeDisplay($this->display->id, $args);
switch ($this->get_option('attachment_position')) {
switch ($this->getOption('attachment_position')) {
case 'before':
$this->view->attachment_before .= $attachment;
break;
@ -277,8 +277,8 @@ class Attachment extends DisplayPluginBase {
* they are set to inherit the exposed filter settings
* of their parent display.
*/
function uses_exposed() {
if (!empty($this->options['inherit_exposed_filters']) && parent::uses_exposed()) {
public function usesExposed() {
if (!empty($this->options['inherit_exposed_filters']) && parent::usesExposed()) {
return TRUE;
}
return FALSE;
@ -289,12 +289,12 @@ class Attachment extends DisplayPluginBase {
* settings from its parent display, then don't render and
* display a second set of exposed filter widgets.
*/
function displays_exposed() {
public function displaysExposed() {
return $this->options['inherit_exposed_filters'] ? FALSE : TRUE;
}
function render_pager() {
return $this->usesPager() && $this->get_option('render_pager');
public function renderPager() {
return $this->usesPager() && $this->getOption('render_pager');
}
}

View File

@ -48,9 +48,9 @@ class Block extends DisplayPluginBase {
* but extended block handlers might be able to do interesting
* stuff with it.
*/
function execute_hook_block_list($delta = 0, $edit = array()) {
public function executeHookBlockList($delta = 0, $edit = array()) {
$delta = $this->view->name . '-' . $this->display->id;
$desc = $this->get_option('block_description');
$desc = $this->getOption('block_description');
if (empty($desc)) {
if ($this->display->display_title == $this->definition['title']) {
@ -63,7 +63,7 @@ class Block extends DisplayPluginBase {
return array(
$delta => array(
'info' => $desc,
'cache' => $this->get_cache_type()
'cache' => $this->getCacheType()
),
);
}
@ -71,12 +71,12 @@ class Block extends DisplayPluginBase {
/**
* The display block handler returns the structure necessary for a block.
*/
function execute() {
public function execute() {
// Prior to this being called, the $view should already be set to this
// display, and arguments should be set on the view.
$info['content'] = $this->view->render();
$info['subject'] = filter_xss_admin($this->view->getTitle());
if (!empty($this->view->result) || $this->get_option('empty') || !empty($this->view->style_plugin->definition['even empty'])) {
if (!empty($this->view->result) || $this->getOption('empty') || !empty($this->view->style_plugin->definition['even empty'])) {
return $info;
}
}
@ -86,9 +86,9 @@ class Block extends DisplayPluginBase {
*
* This output is returned as an array.
*/
function options_summary(&$categories, &$options) {
public function optionsSummary(&$categories, &$options) {
// It is very important to call the parent function here:
parent::options_summary($categories, $options);
parent::optionsSummary($categories, $options);
$categories['block'] = array(
'title' => t('Block settings'),
@ -98,7 +98,7 @@ class Block extends DisplayPluginBase {
),
);
$block_description = strip_tags($this->get_option('block_description'));
$block_description = strip_tags($this->getOption('block_description'));
if (empty($block_description)) {
$block_description = t('None');
}
@ -109,18 +109,18 @@ class Block extends DisplayPluginBase {
'value' => views_ui_truncate($block_description, 24),
);
$types = $this->block_caching_modes();
$types = $this->blockCachingModes();
$options['block_caching'] = array(
'category' => 'other',
'title' => t('Block caching'),
'value' => $types[$this->get_cache_type()],
'value' => $types[$this->getCacheType()],
);
}
/**
* Provide a list of core's block caching modes.
*/
function block_caching_modes() {
protected function blockCachingModes() {
return array(
DRUPAL_NO_CACHE => t('Do not cache'),
DRUPAL_CACHE_GLOBAL => t('Cache once for everything (global)'),
@ -136,8 +136,8 @@ class Block extends DisplayPluginBase {
* Provide a single method to figure caching type, keeping a sensible default
* for when it's unset.
*/
function get_cache_type() {
$cache_type = $this->get_option('block_caching');
protected function getCacheType() {
$cache_type = $this->getOption('block_caching');
if (empty($cache_type)) {
$cache_type = DRUPAL_NO_CACHE;
}
@ -147,7 +147,7 @@ class Block extends DisplayPluginBase {
/**
* Provide the default form for setting options.
*/
function options_form(&$form, &$form_state) {
public function options_form(&$form, &$form_state) {
// It is very important to call the parent function here:
parent::options_form($form, $form_state);
@ -157,7 +157,7 @@ class Block extends DisplayPluginBase {
$form['block_description'] = array(
'#type' => 'textfield',
'#description' => t('This will appear as the name of this block in administer >> structure >> blocks.'),
'#default_value' => $this->get_option('block_description'),
'#default_value' => $this->getOption('block_description'),
);
break;
case 'block_caching':
@ -166,13 +166,13 @@ class Block extends DisplayPluginBase {
$form['block_caching'] = array(
'#type' => 'radios',
'#description' => t("This sets the default status for Drupal's built-in block caching method; this requires that caching be turned on in block administration, and be careful because you have little control over when this cache is flushed."),
'#options' => $this->block_caching_modes(),
'#default_value' => $this->get_cache_type(),
'#options' => $this->blockCachingModes(),
'#default_value' => $this->getCacheType(),
);
break;
case 'exposed_form_options':
$this->view->initHandlers();
if (!$this->uses_exposed() && parent::uses_exposed()) {
if (!$this->usesExposed() && parent::usesExposed()) {
$form['exposed_form_options']['warning'] = array(
'#weight' => -10,
'#markup' => '<div class="messages warning">' . t('Exposed filters in block displays require "Use AJAX" to be set to work correctly.') . '</div>',
@ -185,19 +185,19 @@ class Block extends DisplayPluginBase {
* Perform any necessary changes to the form values prior to storage.
* There is no need for this function to actually store the data.
*/
function options_submit(&$form, &$form_state) {
public function options_submit(&$form, &$form_state) {
// It is very important to call the parent function here:
parent::options_submit($form, $form_state);
switch ($form_state['section']) {
case 'display_id':
$this->update_block_bid($form_state['view']->name, $this->display->id, $this->display->new_id);
$this->updateBlockBid($form_state['view']->name, $this->display->id, $this->display->new_id);
break;
case 'block_description':
$this->set_option('block_description', $form_state['values']['block_description']);
$this->setOption('block_description', $form_state['values']['block_description']);
break;
case 'block_caching':
$this->set_option('block_caching', $form_state['values']['block_caching']);
$this->save_block_cache($form_state['view']->name . '-'. $form_state['display_id'], $form_state['values']['block_caching']);
$this->setOption('block_caching', $form_state['values']['block_caching']);
$this->saveBlockCache($form_state['view']->name . '-'. $form_state['display_id'], $form_state['values']['block_caching']);
break;
}
}
@ -205,9 +205,9 @@ class Block extends DisplayPluginBase {
/**
* Block views use exposed widgets only if AJAX is set.
*/
function uses_exposed() {
public function usesExposed() {
if ($this->isAJAXEnabled()) {
return parent::uses_exposed();
return parent::usesExposed();
}
return FALSE;
}
@ -215,7 +215,7 @@ class Block extends DisplayPluginBase {
/**
* Update the block delta when you change the machine readable name of the display.
*/
function update_block_bid($name, $old_delta, $delta) {
protected function updateBlockBid($name, $old_delta, $delta) {
$old_hashes = $hashes = variable_get('views_block_hashes', array());
$old_delta = $name . '-' . $old_delta;
@ -248,7 +248,7 @@ class Block extends DisplayPluginBase {
* Save the block cache setting in the blocks table if this block allready
* exists in the blocks table. Dirty fix untill http://drupal.org/node/235673 gets in.
*/
function save_block_cache($delta, $cache_setting) {
protected function saveBlockCache($delta, $cache_setting) {
if (strlen($delta) >= 32) {
$delta = md5($delta);
}

View File

@ -36,7 +36,7 @@ class DefaultDisplay extends DisplayPluginBase {
* Determine if this display is the 'default' display which contains
* fallback settings
*/
function is_default_display() { return TRUE; }
public function isDefaultDisplay() { return TRUE; }
/**
* The default execute handler fully renders the view.
@ -72,7 +72,7 @@ class DefaultDisplay extends DisplayPluginBase {
* as setting page titles, breadcrumbs, and generating exposed filter
* data if necessary.
*/
function execute() {
public function execute() {
return $this->view->render($this->display->id);
}

File diff suppressed because it is too large Load Diff

View File

@ -43,28 +43,28 @@ class Feed extends Page {
*/
protected $usesPager = FALSE;
function init(&$view, &$display, $options = NULL) {
public function init(&$view, &$display, $options = NULL) {
parent::init($view, $display, $options);
// Set the default row style. Ideally this would be part of the option
// definition, but in this case it's dependent on the view's base table,
// which we don't know until init().
$row_plugins = views_fetch_plugin_names('row', $this->get_style_type(), array($view->base_table));
$row_plugins = views_fetch_plugin_names('row', $this->getStyleType(), array($view->base_table));
$default_row_plugin = key($row_plugins);
if ($this->options['row_plugin'] == '') {
$this->options['row_plugin'] = $default_row_plugin;
}
}
function uses_breadcrumb() { return FALSE; }
function get_style_type() { return 'feed'; }
public function usesBreadcrumb() { return FALSE; }
protected function getStyleType() { return 'feed'; }
/**
* Feeds do not go through the normal page theming mechanism. Instead, they
* go through their own little theme function and then return NULL so that
* Drupal believes that the page has already rendered itself...which it has.
*/
function execute() {
public function execute() {
$output = $this->view->render();
if (empty($output)) {
throw new NotFoundHttpException();
@ -75,7 +75,7 @@ class Feed extends Page {
return $response;
}
function preview() {
public function preview() {
if (!empty($this->view->live_preview)) {
return '<pre>' . check_plain($this->view->render()) . '</pre>';
}
@ -86,16 +86,16 @@ class Feed extends Page {
* Instead of going through the standard views_view.tpl.php, delegate this
* to the style handler.
*/
function render() {
public function render() {
return $this->view->style_plugin->render($this->view->result);
}
function defaultable_sections($section = NULL) {
public function defaultableSections($section = NULL) {
if (in_array($section, array('style_options', 'style_plugin', 'row_options', 'row_plugin'))) {
return FALSE;
}
$sections = parent::defaultable_sections($section);
$sections = parent::defaultableSections($section);
// Tell views our sitename_title option belongs in the title section.
if ($section == 'title') {
@ -107,7 +107,7 @@ class Feed extends Page {
return $sections;
}
function option_definition() {
public function option_definition() {
$options = parent::option_definition();
$options['displays'] = array('default' => array());
@ -125,9 +125,9 @@ class Feed extends Page {
return $options;
}
function options_summary(&$categories, &$options) {
public function optionsSummary(&$categories, &$options) {
// It is very important to call the parent function here:
parent::options_summary($categories, $options);
parent::optionsSummary($categories, $options);
// Since we're childing off the 'page' type, we'll still *call* our
// category 'page' but let's override it so it says feed settings.
@ -139,14 +139,14 @@ class Feed extends Page {
),
);
if ($this->get_option('sitename_title')) {
if ($this->getOption('sitename_title')) {
$options['title']['value'] = t('Using the site name');
}
// I don't think we want to give feeds menus directly.
unset($options['menu']);
$displays = array_filter($this->get_option('displays'));
$displays = array_filter($this->getOption('displays'));
if (count($displays) > 1) {
$attach_to = t('Multiple displays');
}
@ -171,7 +171,7 @@ class Feed extends Page {
/**
* Provide the default form for setting options.
*/
function options_form(&$form, &$form_state) {
public function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
// It is very important to call the parent function here.
parent::options_form($form, $form_state);
@ -184,7 +184,7 @@ class Feed extends Page {
$form['sitename_title'] = array(
'#type' => 'checkbox',
'#title' => t('Use the site name for the title'),
'#default_value' => $this->get_option('sitename_title'),
'#default_value' => $this->getOption('sitename_title'),
);
$form['title'] = $title;
$form['title']['#states'] = array(
@ -205,7 +205,7 @@ class Feed extends Page {
'#type' => 'checkboxes',
'#description' => t('The feed icon will be available only to the selected displays.'),
'#options' => $displays,
'#default_value' => $this->get_option('displays'),
'#default_value' => $this->getOption('displays'),
);
break;
case 'path':
@ -217,15 +217,15 @@ class Feed extends Page {
* Perform any necessary changes to the form values prior to storage.
* There is no need for this function to actually store the data.
*/
function options_submit(&$form, &$form_state) {
public function options_submit(&$form, &$form_state) {
// It is very important to call the parent function here:
parent::options_submit($form, $form_state);
switch ($form_state['section']) {
case 'title':
$this->set_option('sitename_title', $form_state['values']['sitename_title']);
$this->setOption('sitename_title', $form_state['values']['sitename_title']);
break;
case 'displays':
$this->set_option($form_state['section'], $form_state['values'][$form_state['section']]);
$this->setOption($form_state['section'], $form_state['values'][$form_state['section']]);
break;
}
}
@ -233,20 +233,20 @@ class Feed extends Page {
/**
* Attach to another view.
*/
function attach_to($display_id) {
$displays = $this->get_option('displays');
public function attachTo($display_id) {
$displays = $this->getOption('displays');
if (empty($displays[$display_id])) {
return;
}
// Defer to the feed style; it may put in meta information, and/or
// attach a feed icon.
$plugin = $this->get_plugin();
$plugin = $this->getPlugin('style');
if ($plugin) {
$clone = $this->view->cloneView();
$clone->setDisplay($this->display->id);
$clone->buildTitle();
$plugin->attach_to($display_id, $this->get_path(), $clone->getTitle());
$plugin->attach_to($display_id, $this->getPath(), $clone->getTitle());
// Clean up
$clone->destroy();
@ -254,7 +254,7 @@ class Feed extends Page {
}
}
function uses_link_display() {
public function usesLinkDisplay() {
return TRUE;
}

View File

@ -39,10 +39,10 @@ class Page extends DisplayPluginBase {
/**
* The page display has a path.
*/
function has_path() { return TRUE; }
function uses_breadcrumb() { return TRUE; }
public function hasPath() { return TRUE; }
public function usesBreadcrumb() { return TRUE; }
function option_definition() {
public function option_definition() {
$options = parent::option_definition();
$options['path'] = array('default' => '');
@ -74,12 +74,12 @@ class Page extends DisplayPluginBase {
/**
* Add this display's path information to Drupal's menu system.
*/
function execute_hook_menu($callbacks) {
public function executeHookMenu($callbacks) {
$items = array();
// Replace % with the link to our standard views argument loader
// views_arg_load -- which lives in views.module
$bits = explode('/', $this->get_option('path'));
$bits = explode('/', $this->getOption('path'));
$page_arguments = array($this->view->name, $this->display->id);
$this->view->initHandlers();
$view_arguments = $this->view->argument;
@ -98,7 +98,7 @@ class Page extends DisplayPluginBase {
$path = implode('/', $bits);
$access_plugin = $this->get_plugin('access');
$access_plugin = $this->getPlugin('access');
if (!isset($access_plugin)) {
$access_plugin = views_get_plugin('access', 'none');
}
@ -143,7 +143,7 @@ class Page extends DisplayPluginBase {
// Identify URL embedded arguments and correlate them to a handler
'load arguments' => array($this->view->name, $this->display->id, '%index'),
);
$menu = $this->get_option('menu');
$menu = $this->getOption('menu');
if (empty($menu)) {
$menu = array('type' => 'none');
}
@ -184,7 +184,7 @@ class Page extends DisplayPluginBase {
// If this is a 'default' tab, check to see if we have to create teh
// parent menu item.
if ($menu['type'] == 'default tab') {
$tab_options = $this->get_option('tab_options');
$tab_options = $this->getOption('tab_options');
if (!empty($tab_options['type']) && $tab_options['type'] != 'none') {
$bits = explode('/', $path);
// Remove the last piece.
@ -232,7 +232,7 @@ class Page extends DisplayPluginBase {
* a drupal_set_title for the page, and does a views_set_page_view
* on the view.
*/
function execute() {
public function execute() {
// Let the world know that this is the page view we're using.
views_set_page_view($this->view);
@ -264,9 +264,9 @@ class Page extends DisplayPluginBase {
*
* This output is returned as an array.
*/
function options_summary(&$categories, &$options) {
public function optionsSummary(&$categories, &$options) {
// It is very important to call the parent function here:
parent::options_summary($categories, $options);
parent::optionsSummary($categories, $options);
$categories['page'] = array(
'title' => t('Page settings'),
@ -276,7 +276,7 @@ class Page extends DisplayPluginBase {
),
);
$path = strip_tags('/' . $this->get_option('path'));
$path = strip_tags('/' . $this->getOption('path'));
if (empty($path)) {
$path = t('None');
}
@ -287,7 +287,7 @@ class Page extends DisplayPluginBase {
'value' => views_ui_truncate($path, 24),
);
$menu = $this->get_option('menu');
$menu = $this->getOption('menu');
if (!is_array($menu)) {
$menu = array('type' => 'none');
}
@ -321,7 +321,7 @@ class Page extends DisplayPluginBase {
/**
* Provide the default form for setting options.
*/
function options_form(&$form, &$form_state) {
public function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
// It is very important to call the parent function here:
parent::options_form($form, $form_state);
@ -332,7 +332,7 @@ class Page extends DisplayPluginBase {
$form['path'] = array(
'#type' => 'textfield',
'#description' => t('This view will be displayed by visiting this path on your site. You may use "%" in your URL to represent values that will be used for contextual filters: For example, "node/%/feed".'),
'#default_value' => $this->get_option('path'),
'#default_value' => $this->getOption('path'),
'#field_prefix' => '<span dir="ltr">' . url(NULL, array('absolute' => TRUE)),
'#field_suffix' => '</span>&lrm;',
'#attributes' => array('dir' => 'ltr'),
@ -345,7 +345,7 @@ class Page extends DisplayPluginBase {
'#suffix' => '</div>',
'#tree' => TRUE,
);
$menu = $this->get_option('menu');
$menu = $this->getOption('menu');
if (empty($menu)) {
$menu = array('type' => 'none', 'title' => '', 'weight' => 0);
}
@ -466,7 +466,7 @@ class Page extends DisplayPluginBase {
break;
case 'tab_options':
$form['#title'] .= t('Default tab options');
$tab_options = $this->get_option('tab_options');
$tab_options = $this->getOption('tab_options');
if (empty($tab_options)) {
$tab_options = array('type' => 'none', 'title' => '', 'weight' => 0);
}
@ -562,7 +562,7 @@ class Page extends DisplayPluginBase {
}
}
function options_validate(&$form, &$form_state) {
public function options_validate(&$form, &$form_state) {
// It is very important to call the parent function here:
parent::options_validate($form, $form_state);
switch ($form_state['section']) {
@ -579,7 +579,7 @@ class Page extends DisplayPluginBase {
$form_state['values']['path'] = trim($form_state['values']['path'], '/ ');
break;
case 'menu':
$path = $this->get_option('path');
$path = $this->getOption('path');
if ($form_state['values']['menu']['type'] == 'normal' && strpos($path, '%') !== FALSE) {
form_error($form['menu']['type'], t('Views cannot create normal menu items for paths with a % in them.'));
}
@ -599,36 +599,36 @@ class Page extends DisplayPluginBase {
}
}
function options_submit(&$form, &$form_state) {
public function options_submit(&$form, &$form_state) {
// It is very important to call the parent function here:
parent::options_submit($form, $form_state);
switch ($form_state['section']) {
case 'path':
$this->set_option('path', $form_state['values']['path']);
$this->setOption('path', $form_state['values']['path']);
break;
case 'menu':
$this->set_option('menu', $form_state['values']['menu']);
$this->setOption('menu', $form_state['values']['menu']);
// send ajax form to options page if we use it.
if ($form_state['values']['menu']['type'] == 'default tab') {
views_ui_add_form_to_stack('display', $this->view, $this->display->id, array('tab_options'));
}
break;
case 'tab_options':
$this->set_option('tab_options', $form_state['values']['tab_options']);
$this->setOption('tab_options', $form_state['values']['tab_options']);
break;
}
}
function validate() {
public function validate() {
$errors = parent::validate();
$menu = $this->get_option('menu');
$menu = $this->getOption('menu');
if (!empty($menu['type']) && $menu['type'] != 'none' && empty($menu['title'])) {
$errors[] = t('Display @display is set to use a menu but the menu link text is not set.', array('@display' => $this->display->display_title));
}
if ($menu['type'] == 'default tab') {
$tab_options = $this->get_option('tab_options');
$tab_options = $this->getOption('tab_options');
if (!empty($tab_options['type']) && $tab_options['type'] != 'none' && empty($tab_options['title'])) {
$errors[] = t('Display @display is set to use a parent menu but the parent menu link text is not set.', array('@display' => $this->display->display_title));
}
@ -637,7 +637,7 @@ class Page extends DisplayPluginBase {
return $errors;
}
function get_argument_text() {
public function getArgumentText() {
return array(
'filter value not present' => t('When the filter value is <em>NOT</em> in the URL'),
'filter value present' => t('When the filter value <em>IS</em> in the URL or a default is provided'),
@ -645,7 +645,7 @@ class Page extends DisplayPluginBase {
);
}
function get_pager_text() {
public function getPagerText() {
return array(
'items per page title' => t('Items per page'),
'items per page description' => t('The number of items to display per page. Enter 0 for no limit.')

View File

@ -17,7 +17,7 @@ use Drupal\Core\Annotation\Translation;
*/
abstract class DisplayExtenderPluginBase extends PluginBase {
function init(&$view, &$display) {
public function init(&$view, &$display) {
$this->view = $view;
$this->display = $display;
}
@ -25,44 +25,44 @@ abstract class DisplayExtenderPluginBase extends PluginBase {
/**
* Provide a form to edit options for this plugin.
*/
function options_definition_alter(&$options) { }
public function options_definition_alter(&$options) { }
/**
* Provide a form to edit options for this plugin.
*/
function options_form(&$form, &$form_state) { }
public function options_form(&$form, &$form_state) { }
/**
* Validate the options form.
*/
function options_validate(&$form, &$form_state) { }
public function options_validate(&$form, &$form_state) { }
/**
* Handle any special handling on the validate form.
*/
function options_submit(&$form, &$form_state) { }
public function options_submit(&$form, &$form_state) { }
/**
* Set up any variables on the view prior to execution.
*/
function pre_execute() { }
public function pre_execute() { }
/**
* Inject anything into the query that the display_extender handler needs.
*/
function query() { }
public function query() { }
/**
* Provide the default summary for options in the views UI.
*
* This output is returned as an array.
*/
function options_summary(&$categories, &$options) { }
public function optionsSummary(&$categories, &$options) { }
/**
* Static member function to list which sections are defaultable
* and what items each section contains.
*/
function defaultable_sections(&$sections, $section = NULL) { }
public function defaultableSections(&$sections, $section = NULL) { }
}

View File

@ -152,7 +152,7 @@ abstract class ExposedFormPluginBase extends PluginBase {
// Some types of displays (eg. attachments) may wish to use the exposed
// filters of their parent displays instead of showing an additional
// exposed filter form for the attachment as well as that for the parent.
if (!$this->view->display_handler->displays_exposed() || (!$block && $this->view->display_handler->get_option('exposed_block'))) {
if (!$this->view->display_handler->displaysExposed() || (!$block && $this->view->display_handler->getOption('exposed_block'))) {
unset($form_state['rerender']);
}
@ -164,7 +164,7 @@ abstract class ExposedFormPluginBase extends PluginBase {
$form = drupal_build_form('views_exposed_form', $form_state);
$output = drupal_render($form);
if (!$this->view->display_handler->displays_exposed() || (!$block && $this->view->display_handler->get_option('exposed_block'))) {
if (!$this->view->display_handler->displaysExposed() || (!$block && $this->view->display_handler->getOption('exposed_block'))) {
return "";
}
else {
@ -257,7 +257,7 @@ abstract class ExposedFormPluginBase extends PluginBase {
}
}
$pager = $this->view->display_handler->get_plugin('pager');
$pager = $this->view->display_handler->getPlugin('pager');
if ($pager) {
$pager->exposed_form_alter($form, $form_state);
$form_state['pager_plugin'] = $pager;
@ -311,7 +311,7 @@ abstract class ExposedFormPluginBase extends PluginBase {
// default display. If they are, store them on this display. This way,
// multiple displays in the same view can share the same filters and
// remember settings.
$display_id = ($this->view->display_handler->is_defaulted('filters')) ? 'default' : $this->view->current_display;
$display_id = ($this->view->display_handler->isDefaulted('filters')) ? 'default' : $this->view->current_display;
if (isset($_SESSION['views'][$this->view->name][$display_id])) {
unset($_SESSION['views'][$this->view->name][$display_id]);

View File

@ -88,7 +88,7 @@ class InputRequired extends ExposedFormPluginBase {
$this->display->handler->handlers['empty'] = array(
'area' => $handler,
);
$this->display->handler->set_option('empty', array('text' => $options));
$this->display->handler->setOption('empty', array('text' => $options));
}
}

View File

@ -30,7 +30,7 @@ class ContextualLinks extends FieldPluginBase {
}
function options_form(&$form, &$form_state) {
$all_fields = $this->view->display_handler->get_field_labels();
$all_fields = $this->view->display_handler->getFieldLabels();
// Offer to include only those fields that follow this one.
$field_options = array_slice($all_fields, 0, array_search($this->options['id'], array_keys($all_fields)));
$form['fields'] = array(

View File

@ -850,7 +850,7 @@ abstract class FieldPluginBase extends HandlerBase {
// Get a list of the available fields and arguments for token replacement.
$options = array();
foreach ($this->view->display_handler->get_handlers('field') as $field => $handler) {
foreach ($this->view->display_handler->getHandlers('field') as $field => $handler) {
$options[t('Fields')]["[$field]"] = $handler->ui_name();
// We only use fields up to (and including) this one.
if ($field == $this->options['id']) {
@ -858,7 +858,7 @@ abstract class FieldPluginBase extends HandlerBase {
}
}
$count = 0; // This lets us prepare the key as we want it printed.
foreach ($this->view->display_handler->get_handlers('argument') as $arg => $handler) {
foreach ($this->view->display_handler->getHandlers('argument') as $arg => $handler) {
$options[t('Arguments')]['%' . ++$count] = t('@argument title', array('@argument' => $handler->ui_name()));
$options[t('Arguments')]['!' . $count] = t('@argument input', array('@argument' => $handler->ui_name()));
}
@ -1468,7 +1468,7 @@ If you would like to have the characters \'[\' and \']\' please use the html ent
$tokens = $this->view->build_info['substitutions'];
}
$count = 0;
foreach ($this->view->display_handler->get_handlers('argument') as $arg => $handler) {
foreach ($this->view->display_handler->getHandlers('argument') as $arg => $handler) {
$token = '%' . ++$count;
if (!isset($tokens[$token])) {
$tokens[$token] = '';
@ -1484,7 +1484,7 @@ If you would like to have the characters \'[\' and \']\' please use the html ent
$tokens += $this->get_token_values_recursive(drupal_container()->get('request')->query->all());
// Now add replacements for our fields.
foreach ($this->view->display_handler->get_handlers('field') as $field => $handler) {
foreach ($this->view->display_handler->getHandlers('field') as $field => $handler) {
if (isset($handler->last_render)) {
$tokens["[$field]"] = $handler->last_render;
}

View File

@ -39,7 +39,7 @@ class Combine extends String {
// Allow to choose all fields as possible
if ($this->view->style_plugin->usesFields()) {
$options = array();
foreach ($this->view->display_handler->get_handlers('field') as $name => $field) {
foreach ($this->view->display_handler->getHandlers('field') as $name => $field) {
$options[$name] = $field->ui_name(TRUE);
}
if ($options) {

View File

@ -99,7 +99,7 @@ abstract class FilterPluginBase extends HandlerBase {
// If there are relationships in the view, allow empty should be true
// so that we can do IS NULL checks on items. Not all filters respect
// allow empty, but string and numeric do and that covers enough.
if ($this->view->display_handler->get_option('relationships')) {
if ($this->view->display_handler->getOption('relationships')) {
$this->definition['allow empty'] = TRUE;
}
}
@ -583,7 +583,7 @@ abstract class FilterPluginBase extends HandlerBase {
form_error($form['expose']['identifier'], t('This identifier is not allowed.'));
}
if (!$this->view->display_handler->is_identifier_unique($form_state['id'], $form_state['values']['options']['expose']['identifier'])) {
if (!$this->view->display_handler->isIdentifierUnique($form_state['id'], $form_state['values']['options']['expose']['identifier'])) {
form_error($form['expose']['identifier'], t('This identifier is used by another handler.'));
}
}
@ -601,7 +601,7 @@ abstract class FilterPluginBase extends HandlerBase {
form_error($form['group_info']['identifier'], t('This identifier is not allowed.'));
}
if (!$this->view->display_handler->is_identifier_unique($form_state['id'], $form_state['values']['options']['group_info']['identifier'])) {
if (!$this->view->display_handler->isIdentifierUnique($form_state['id'], $form_state['values']['options']['group_info']['identifier'])) {
form_error($form['group_info']['identifier'], t('This identifier is used by another handler.'));
}
}
@ -1236,7 +1236,7 @@ abstract class FilterPluginBase extends HandlerBase {
// Figure out which display id is responsible for the filters, so we
// know where to look for session stored values.
$display_id = ($this->view->display_handler->is_defaulted('filters')) ? 'default' : $this->view->current_display;
$display_id = ($this->view->display_handler->isDefaulted('filters')) ? 'default' : $this->view->current_display;
// false means that we got a setting that means to recuse ourselves,
// so we should erase whatever happened to be there.
@ -1327,7 +1327,7 @@ abstract class FilterPluginBase extends HandlerBase {
// Figure out which display id is responsible for the filters, so we
// know where to look for session stored values.
$display_id = ($this->view->display_handler->is_defaulted('filters')) ? 'default' : $this->view->current_display;
$display_id = ($this->view->display_handler->isDefaulted('filters')) ? 'default' : $this->view->current_display;
// shortcut test.
$operator = !empty($this->options['expose']['use_operator']) && !empty($this->options['expose']['operator_id']);

View File

@ -67,7 +67,7 @@ class Full extends PagerPluginBase {
*/
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$pager_text = $this->display->handler->get_pager_text();
$pager_text = $this->display->handler->getPagerText();
$form['items_per_page'] = array(
'#title' => $pager_text['items per page title'],
'#type' => 'number',

View File

@ -44,7 +44,7 @@ class Some extends PagerPluginBase {
*/
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$pager_text = $this->display->handler->get_pager_text();
$pager_text = $this->display->handler->getPagerText();
$form['items_per_page'] = array(
'#title' => $pager_text['items per page title'],
'#type' => 'textfield',

View File

@ -50,7 +50,7 @@ class Fields extends RowPluginBase {
*/
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$options = $this->display->handler->get_field_labels();
$options = $this->display->handler->getFieldLabels();
if (empty($this->options['inline'])) {
$this->options['inline'] = array();

View File

@ -46,7 +46,7 @@ abstract class RowPluginBase extends PluginBase {
$this->display = &$display;
// Overlay incoming options on top of defaults
$this->unpack_options($this->options, isset($options) ? $options : $display->handler->get_option('row_options'));
$this->unpack_options($this->options, isset($options) ? $options : $display->handler->getOption('row_options'));
}
/**
@ -78,7 +78,7 @@ abstract class RowPluginBase extends PluginBase {
// A whole bunch of code to figure out what relationships are valid for
// this item.
$relationships = $view->display_handler->get_option('relationships');
$relationships = $view->display_handler->getOption('relationships');
$relationship_options = array();
foreach ($relationships as $relationship) {

View File

@ -46,7 +46,7 @@ class RssFields extends RowPluginBase {
parent::options_form($form, $form_state);
$initial_labels = array('' => t('- None -'));
$view_fields_labels = $this->display->handler->get_field_labels();
$view_fields_labels = $this->display->handler->getFieldLabels();
$view_fields_labels = array_merge($initial_labels, $view_fields_labels);
$form['title_field'] = array(

View File

@ -42,7 +42,7 @@ class Rss extends StylePluginBase {
$url_options['absolute'] = TRUE;
$url = url($this->view->getUrl(NULL, $path), $url_options);
if ($display->has_path()) {
if ($display->hasPath()) {
if (empty($this->preview)) {
drupal_add_feed($url, $title);
}

View File

@ -94,10 +94,10 @@ abstract class StylePluginBase extends PluginBase {
$this->display = &$display;
// Overlay incoming options on top of defaults
$this->unpack_options($this->options, isset($options) ? $options : $display->handler->get_option('style_options'));
$this->unpack_options($this->options, isset($options) ? $options : $display->handler->getOption('style_options'));
if ($this->usesRowPlugin() && $display->handler->get_option('row_plugin')) {
$this->row_plugin = $display->handler->get_plugin('row');
if ($this->usesRowPlugin() && $display->handler->getOption('row_plugin')) {
$this->row_plugin = $display->handler->getPlugin('row');
}
$this->options += array(
@ -242,7 +242,7 @@ abstract class StylePluginBase extends PluginBase {
// @TODO: Document "usesGrouping" in docs.php when docs.php is written.
if ($this->usesFields() && $this->usesGrouping()) {
$options = array('' => t('- None -'));
$field_labels = $this->display->handler->get_field_labels(TRUE);
$field_labels = $this->display->handler->getFieldLabels(TRUE);
$options += $field_labels;
// If there are no fields, we can't group on them.
if (count($options) > 1) {
@ -661,7 +661,7 @@ abstract class StylePluginBase extends PluginBase {
$errors = parent::validate();
if ($this->usesRowPlugin()) {
$plugin = $this->display->handler->get_plugin('row');
$plugin = $this->display->handler->getPlugin('row');
if (empty($plugin)) {
$errors[] = t('Style @style requires a row style but the row plugin is invalid.', array('@style' => $this->definition['title']));
}

View File

@ -164,7 +164,7 @@ class Table extends StylePluginBase {
function sanitize_columns($columns, $fields = NULL) {
$sanitized = array();
if ($fields === NULL) {
$fields = $this->display->handler->get_option('fields');
$fields = $this->display->handler->getOption('fields');
}
// Preconfigure the sanitized array so that the order is retained.
foreach ($fields as $field => $info) {
@ -197,7 +197,7 @@ class Table extends StylePluginBase {
*/
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$handlers = $this->display->handler->get_handlers('field');
$handlers = $this->display->handler->getHandlers('field');
if (empty($handlers)) {
$form['error_markup'] = array(
'#markup' => '<div class="error messages">' . t('You need at least one field before you can configure your table settings') . '</div>',
@ -233,7 +233,7 @@ class Table extends StylePluginBase {
$columns = $this->sanitize_columns($this->options['columns']);
// Create an array of allowed columns from the data we know:
$field_names = $this->display->handler->get_field_labels();
$field_names = $this->display->handler->getFieldLabels();
if (isset($this->options['default'])) {
$default = $this->options['default'];

View File

@ -618,7 +618,7 @@ abstract class WizardPluginBase implements WizardInterface {
// Display: Master
$default_display = $view->new_display('default', 'Master', 'default');
foreach ($display_options['default'] as $option => $value) {
$default_display->set_option($option, $value);
$default_display->setOption($option, $value);
}
// Display: Page
@ -896,12 +896,12 @@ abstract class WizardPluginBase implements WizardInterface {
foreach ($options as $option => $value) {
// If the default display supports this option, set the value there.
// Otherwise, set it on the provided display.
$default_value = $default_display->get_option($option);
$default_value = $default_display->getOption($option);
if (isset($default_value)) {
$default_display->set_option($option, $value);
$default_display->setOption($option, $value);
}
else {
$display->set_option($option, $value);
$display->setOption($option, $value);
}
}
}
@ -932,12 +932,12 @@ abstract class WizardPluginBase implements WizardInterface {
foreach ($options as $option => $value) {
// Only override the default value if it is different from the value that
// was provided.
$default_value = $default_display->get_option($option);
$default_value = $default_display->getOption($option);
if (!isset($default_value)) {
$display->set_option($option, $value);
$display->setOption($option, $value);
}
elseif ($default_value !== $value) {
$display->override_option($option, $value);
$display->overrideOption($option, $value);
}
}
}

View File

@ -50,7 +50,7 @@ class BasicTest extends ViewTestBase {
$view = $this->getBasicView();
// Add a filter.
$view->display['default']->handler->override_option('filters', array(
$view->display['default']->handler->overrideOption('filters', array(
'age' => array(
'operator' => '<',
'value' => array(
@ -108,7 +108,7 @@ class BasicTest extends ViewTestBase {
$view = $this->getBasicView();
// Add a argument.
$view->display['default']->handler->override_option('arguments', array(
$view->display['default']->handler->overrideOption('arguments', array(
'age' => array(
'default_action' => 'ignore',
'style_plugin' => 'default_summary',

View File

@ -33,7 +33,7 @@ class AreaTextTest extends HandlerTestBase {
// add a text header
$string = $this->randomName();
$view->display['default']->handler->override_option('header', array(
$view->display['default']->handler->overrideOption('header', array(
'area' => array(
'id' => 'area',
'table' => 'views',

View File

@ -39,7 +39,7 @@ class ArgumentNullTest extends HandlerTestBase {
// Add a null argument.
$string = $this->randomString();
$view->display['default']->handler->override_option('arguments', array(
$view->display['default']->handler->overrideOption('arguments', array(
'null' => array(
'id' => 'null',
'table' => 'views',
@ -64,7 +64,7 @@ class ArgumentNullTest extends HandlerTestBase {
// Add a argument, which has null as handler.
$string = $this->randomString();
$view->display['default']->handler->override_option('arguments', array(
$view->display['default']->handler->overrideOption('arguments', array(
'id' => array(
'id' => 'id',
'table' => 'views_test',

View File

@ -43,7 +43,7 @@ class FieldBooleanTest extends HandlerTestBase {
public function testFieldBoolean() {
$view = $this->getBasicView();
$view->display['default']->handler->override_option('fields', array(
$view->display['default']->handler->overrideOption('fields', array(
'age' => array(
'id' => 'age',
'table' => 'views_test',

View File

@ -28,7 +28,7 @@ class FieldCounterTest extends HandlerTestBase {
function testSimple() {
$view = $this->getBasicView();
$view->display['default']->handler->override_option('fields', array(
$view->display['default']->handler->overrideOption('fields', array(
'counter' => array(
'id' => 'counter',
'table' => 'views',
@ -51,7 +51,7 @@ class FieldCounterTest extends HandlerTestBase {
$view = $this->getBasicView();
$rand_start = rand(5, 10);
$view->display['default']->handler->override_option('fields', array(
$view->display['default']->handler->overrideOption('fields', array(
'counter' => array(
'id' => 'counter',
'table' => 'views',

View File

@ -37,7 +37,7 @@ class FieldCustomTest extends HandlerTestBase {
// Alter the text of the field to a random string.
$random = $this->randomName();
$view->display['default']->handler->override_option('fields', array(
$view->display['default']->handler->overrideOption('fields', array(
'name' => array(
'id' => 'name',
'table' => 'views_test',

View File

@ -35,7 +35,7 @@ class FieldDateTest extends HandlerTestBase {
public function testFieldDate() {
$view = $this->getBasicView();
$view->display['default']->handler->override_option('fields', array(
$view->display['default']->handler->overrideOption('fields', array(
'created' => array(
'id' => 'created',
'table' => 'views_test',

View File

@ -48,7 +48,7 @@ class FieldFileSizeTest extends HandlerTestBase {
public function testFieldFileSize() {
$view = $this->getBasicView();
$view->display['default']->handler->override_option('fields', array(
$view->display['default']->handler->overrideOption('fields', array(
'age' => array(
'id' => 'age',
'table' => 'views_test',

View File

@ -35,7 +35,7 @@ class FieldUrlTest extends HandlerTestBase {
public function testFieldUrl() {
$view = $this->getBasicView();
$view->display['default']->handler->override_option('fields', array(
$view->display['default']->handler->overrideOption('fields', array(
'name' => array(
'id' => 'name',
'table' => 'views_test',
@ -53,7 +53,7 @@ class FieldUrlTest extends HandlerTestBase {
$view->delete();
$view = $this->getBasicView();
$view->display['default']->handler->override_option('fields', array(
$view->display['default']->handler->overrideOption('fields', array(
'name' => array(
'id' => 'name',
'table' => 'views_test',

View File

@ -49,7 +49,7 @@ class FieldXssTest extends HandlerTestBase {
public function testFieldXss() {
$view = $this->getBasicView();
$view->display['default']->handler->override_option('fields', array(
$view->display['default']->handler->overrideOption('fields', array(
'name' => array(
'id' => 'name',
'table' => 'views_test',

View File

@ -49,7 +49,7 @@ class FilterCombineTest extends HandlerTestBase {
$view = $this->getBasicView();
// Change the filtering.
$view->display['default']->handler->override_option('filters', array(
$view->display['default']->handler->overrideOption('filters', array(
'age' => array(
'id' => 'combine',
'table' => 'views',

View File

@ -41,7 +41,7 @@ class FilterEqualityTest extends HandlerTestBase {
$view = $this->getBasicView();
// Change the filtering
$view->display['default']->handler->override_option('filters', array(
$view->display['default']->handler->overrideOption('filters', array(
'name' => array(
'id' => 'name',
'table' => 'views_test',
@ -68,7 +68,7 @@ class FilterEqualityTest extends HandlerTestBase {
// Filter: Name, Operator: =, Value: Ringo
$filters['name']['group_info']['default_group'] = 1;
$view->setDisplay('page_1');
$view->display['page_1']->handler->override_option('filters', $filters);
$view->display['page_1']->handler->overrideOption('filters', $filters);
$this->executeView($view);
$resultset = array(
@ -83,7 +83,7 @@ class FilterEqualityTest extends HandlerTestBase {
$view = $this->getBasicView();
// Change the filtering
$view->display['default']->handler->override_option('filters', array(
$view->display['default']->handler->overrideOption('filters', array(
'name' => array(
'id' => 'name',
'table' => 'views_test',
@ -119,7 +119,7 @@ class FilterEqualityTest extends HandlerTestBase {
// Filter: Name, Operator: !=, Value: Ringo
$filters['name']['group_info']['default_group'] = 2;
$view->setDisplay('page_1');
$view->display['page_1']->handler->override_option('filters', $filters);
$view->display['page_1']->handler->overrideOption('filters', $filters);
$this->executeView($view);
$resultset = array(

View File

@ -37,7 +37,7 @@ class FilterInOperatorTest extends HandlerTestBase {
$view = $this->getBasicView();
// Add a in_operator ordering.
$view->display['default']->handler->override_option('filters', array(
$view->display['default']->handler->overrideOption('filters', array(
'age' => array(
'id' => 'age',
'field' => 'age',
@ -70,7 +70,7 @@ class FilterInOperatorTest extends HandlerTestBase {
$view = $this->getBasicView();
// Add a in_operator ordering.
$view->display['default']->handler->override_option('filters', array(
$view->display['default']->handler->overrideOption('filters', array(
'age' => array(
'id' => 'age',
'field' => 'age',
@ -111,7 +111,7 @@ class FilterInOperatorTest extends HandlerTestBase {
// Filter: Age, Operator: in, Value: 26, 30
$filters['age']['group_info']['default_group'] = 1;
$view->setDisplay('page_1');
$view->display['page_1']->handler->override_option('filters', $filters);
$view->display['page_1']->handler->overrideOption('filters', $filters);
$this->executeView($view);
@ -140,7 +140,7 @@ class FilterInOperatorTest extends HandlerTestBase {
// Filter: Age, Operator: in, Value: 26, 30
$filters['age']['group_info']['default_group'] = 2;
$view->setDisplay('page_1');
$view->display['page_1']->handler->override_option('filters', $filters);
$view->display['page_1']->handler->overrideOption('filters', $filters);
$this->executeView($view);

View File

@ -45,7 +45,7 @@ class FilterNumericTest extends HandlerTestBase {
$view = $this->getBasicView();
// Change the filtering
$view->display['default']->handler->override_option('filters', array(
$view->display['default']->handler->overrideOption('filters', array(
'age' => array(
'id' => 'age',
'table' => 'views_test',
@ -73,7 +73,7 @@ class FilterNumericTest extends HandlerTestBase {
// Filter: Age, Operator: =, Value: 28
$filters['age']['group_info']['default_group'] = 1;
$view->setDisplay('page_1');
$view->display['page_1']->handler->override_option('filters', $filters);
$view->display['page_1']->handler->overrideOption('filters', $filters);
$this->executeView($view);
$resultset = array(
@ -89,7 +89,7 @@ class FilterNumericTest extends HandlerTestBase {
$view = $this->getBasicView();
// Change the filtering
$view->display['default']->handler->override_option('filters', array(
$view->display['default']->handler->overrideOption('filters', array(
'age' => array(
'id' => 'age',
'table' => 'views_test',
@ -125,7 +125,7 @@ class FilterNumericTest extends HandlerTestBase {
$view = $this->getBasicView();
// Change the filtering
$view->display['default']->handler->override_option('filters', array(
$view->display['default']->handler->overrideOption('filters', array(
'age' => array(
'id' => 'age',
'table' => 'views_test',
@ -164,7 +164,7 @@ class FilterNumericTest extends HandlerTestBase {
// Filter: Age, Operator: between, Value: 26 and 29
$filters['age']['group_info']['default_group'] = 2;
$view->setDisplay('page_1');
$view->display['page_1']->handler->override_option('filters', $filters);
$view->display['page_1']->handler->overrideOption('filters', $filters);
$this->executeView($view);
@ -192,7 +192,7 @@ class FilterNumericTest extends HandlerTestBase {
// Filter: Age, Operator: between, Value: 26 and 29
$filters['age']['group_info']['default_group'] = 3;
$view->setDisplay('page_1');
$view->display['page_1']->handler->override_option('filters', $filters);
$view->display['page_1']->handler->overrideOption('filters', $filters);
$this->executeView($view);
@ -218,7 +218,7 @@ class FilterNumericTest extends HandlerTestBase {
$view = $this->getBasicView();
// Change the filtering
$view->display['default']->handler->override_option('filters', array(
$view->display['default']->handler->overrideOption('filters', array(
'age' => array(
'id' => 'age',
'table' => 'views_test',
@ -237,7 +237,7 @@ class FilterNumericTest extends HandlerTestBase {
$view = $this->getBasicView();
// Change the filtering
$view->display['default']->handler->override_option('filters', array(
$view->display['default']->handler->overrideOption('filters', array(
'age' => array(
'id' => 'age',
'table' => 'views_test',
@ -281,7 +281,7 @@ class FilterNumericTest extends HandlerTestBase {
// Filter: Age, Operator: empty, Value:
$filters['age']['group_info']['default_group'] = 4;
$view->setDisplay('page_1');
$view->display['page_1']->handler->override_option('filters', $filters);
$view->display['page_1']->handler->overrideOption('filters', $filters);
$this->executeView($view);
@ -297,7 +297,7 @@ class FilterNumericTest extends HandlerTestBase {
// Filter: Age, Operator: empty, Value:
$filters['age']['group_info']['default_group'] = 5;
$view->setDisplay('page_1');
$view->display['page_1']->handler->override_option('filters', $filters);
$view->display['page_1']->handler->overrideOption('filters', $filters);
$this->executeView($view);
@ -330,7 +330,7 @@ class FilterNumericTest extends HandlerTestBase {
public function testAllowEmpty() {
$view = $this->getBasicView();
$view->display['default']->handler->override_option('filters', array(
$view->display['default']->handler->overrideOption('filters', array(
'id' => array(
'id' => 'id',
'table' => 'views_test',

View File

@ -82,7 +82,7 @@ class FilterStringTest extends HandlerTestBase {
$view = $this->getBasicView();
// Change the filtering
$view->display['default']->handler->override_option('filters', array(
$view->display['default']->handler->overrideOption('filters', array(
'name' => array(
'id' => 'name',
'table' => 'views_test',
@ -109,7 +109,7 @@ class FilterStringTest extends HandlerTestBase {
// Filter: Name, Operator: =, Value: Ringo
$filters['name']['group_info']['default_group'] = 1;
$view->setDisplay('page_1');
$view->display['page_1']->handler->override_option('filters', $filters);
$view->display['page_1']->handler->overrideOption('filters', $filters);
$this->executeView($view);
@ -126,7 +126,7 @@ class FilterStringTest extends HandlerTestBase {
$view = $this->getBasicView();
// Change the filtering
$view->display['default']->handler->override_option('filters', array(
$view->display['default']->handler->overrideOption('filters', array(
'name' => array(
'id' => 'name',
'table' => 'views_test',
@ -163,7 +163,7 @@ class FilterStringTest extends HandlerTestBase {
$filters['name']['group_info']['default_group'] = '2';
$view->setDisplay('page_1');
$view->display['page_1']->handler->override_option('filters', $filters);
$view->display['page_1']->handler->overrideOption('filters', $filters);
$this->executeView($view);
@ -189,7 +189,7 @@ class FilterStringTest extends HandlerTestBase {
$view = $this->getBasicView();
// Change the filtering
$view->display['default']->handler->override_option('filters', array(
$view->display['default']->handler->overrideOption('filters', array(
'name' => array(
'id' => 'name',
'table' => 'views_test',
@ -217,7 +217,7 @@ class FilterStringTest extends HandlerTestBase {
// Filter: Name, Operator: contains, Value: ing
$filters['name']['group_info']['default_group'] = '3';
$view->setDisplay('page_1');
$view->display['page_1']->handler->override_option('filters', $filters);
$view->display['page_1']->handler->overrideOption('filters', $filters);
$this->executeView($view);
@ -235,7 +235,7 @@ class FilterStringTest extends HandlerTestBase {
$view = $this->getBasicView();
// Change the filtering
$view->display['default']->handler->override_option('filters', array(
$view->display['default']->handler->overrideOption('filters', array(
'description' => array(
'id' => 'description',
'table' => 'views_test',
@ -261,7 +261,7 @@ class FilterStringTest extends HandlerTestBase {
$view = $this->getBasicView();
// Change the filtering
$view->display['default']->handler->override_option('filters', array(
$view->display['default']->handler->overrideOption('filters', array(
'description' => array(
'id' => 'description',
'table' => 'views_test',
@ -289,7 +289,7 @@ class FilterStringTest extends HandlerTestBase {
// Filter: Name, Operator: contains, Value: ing
$filters['name']['group_info']['default_group'] = '3';
$view->setDisplay('page_1');
$view->display['page_1']->handler->override_option('filters', $filters);
$view->display['page_1']->handler->overrideOption('filters', $filters);
$this->executeView($view);
@ -308,7 +308,7 @@ class FilterStringTest extends HandlerTestBase {
// Filter: Description, Operator: contains, Value: actor
$filters['description']['group_info']['default_group'] = '1';
$view->setDisplay('page_1');
$view->display['page_1']->handler->override_option('filters', $filters);
$view->display['page_1']->handler->overrideOption('filters', $filters);
$this->executeView($view);
$resultset = array(
@ -326,7 +326,7 @@ class FilterStringTest extends HandlerTestBase {
$view = $this->getBasicView();
// Change the filtering
$view->display['default']->handler->override_option('filters', array(
$view->display['default']->handler->overrideOption('filters', array(
'description' => array(
'id' => 'description',
'table' => 'views_test',
@ -353,7 +353,7 @@ class FilterStringTest extends HandlerTestBase {
// Filter: Name, Operator: starts, Value: George
$filters['description']['group_info']['default_group'] = 2;
$view->setDisplay('page_1');
$view->display['page_1']->handler->override_option('filters', $filters);
$view->display['page_1']->handler->overrideOption('filters', $filters);
$this->executeView($view);
@ -369,7 +369,7 @@ class FilterStringTest extends HandlerTestBase {
$view = $this->getBasicView();
// Change the filtering
$view->display['default']->handler->override_option('filters', array(
$view->display['default']->handler->overrideOption('filters', array(
'description' => array(
'id' => 'description',
'table' => 'views_test',
@ -403,7 +403,7 @@ class FilterStringTest extends HandlerTestBase {
// Filter: Name, Operator: not_starts, Value: George
$filters['description']['group_info']['default_group'] = 3;
$view->setDisplay('page_1');
$view->display['page_1']->handler->override_option('filters', $filters);
$view->display['page_1']->handler->overrideOption('filters', $filters);
$this->executeView($view);
@ -426,7 +426,7 @@ class FilterStringTest extends HandlerTestBase {
$view = $this->getBasicView();
// Change the filtering
$view->display['default']->handler->override_option('filters', array(
$view->display['default']->handler->overrideOption('filters', array(
'description' => array(
'id' => 'description',
'table' => 'views_test',
@ -456,7 +456,7 @@ class FilterStringTest extends HandlerTestBase {
// Filter: Descriptino, Operator: ends, Value: Beatles
$filters['description']['group_info']['default_group'] = 4;
$view->setDisplay('page_1');
$view->display['page_1']->handler->override_option('filters', $filters);
$view->display['page_1']->handler->overrideOption('filters', $filters);
$this->executeView($view);
@ -475,7 +475,7 @@ class FilterStringTest extends HandlerTestBase {
$view = $this->getBasicView();
// Change the filtering
$view->display['default']->handler->override_option('filters', array(
$view->display['default']->handler->overrideOption('filters', array(
'description' => array(
'id' => 'description',
'table' => 'views_test',
@ -506,7 +506,7 @@ class FilterStringTest extends HandlerTestBase {
// Filter: Description, Operator: not_ends, Value: Beatles
$filters['description']['group_info']['default_group'] = 5;
$view->setDisplay('page_1');
$view->display['page_1']->handler->override_option('filters', $filters);
$view->display['page_1']->handler->overrideOption('filters', $filters);
$this->executeView($view);
@ -526,7 +526,7 @@ class FilterStringTest extends HandlerTestBase {
$view = $this->getBasicView();
// Change the filtering
$view->display['default']->handler->override_option('filters', array(
$view->display['default']->handler->overrideOption('filters', array(
'description' => array(
'id' => 'description',
'table' => 'views_test',
@ -558,7 +558,7 @@ class FilterStringTest extends HandlerTestBase {
// Filter: Description, Operator: not (does not contains), Value: Beatles
$filters['description']['group_info']['default_group'] = 6;
$view->setDisplay('page_1');
$view->display['page_1']->handler->override_option('filters', $filters);
$view->display['page_1']->handler->overrideOption('filters', $filters);
$this->executeView($view);
@ -579,7 +579,7 @@ class FilterStringTest extends HandlerTestBase {
$view = $this->getBasicView();
// Change the filtering
$view->display['default']->handler->override_option('filters', array(
$view->display['default']->handler->overrideOption('filters', array(
'name' => array(
'id' => 'name',
'table' => 'views_test',
@ -609,7 +609,7 @@ class FilterStringTest extends HandlerTestBase {
// Filter: Name, Operator: shorterthan, Value: 5
$filters['name']['group_info']['default_group'] = 4;
$view->setDisplay('page_1');
$view->display['page_1']->handler->override_option('filters', $filters);
$view->display['page_1']->handler->overrideOption('filters', $filters);
$this->executeView($view);
$resultset = array(
@ -627,7 +627,7 @@ class FilterStringTest extends HandlerTestBase {
$view = $this->getBasicView();
// Change the filtering
$view->display['default']->handler->override_option('filters', array(
$view->display['default']->handler->overrideOption('filters', array(
'name' => array(
'id' => 'name',
'table' => 'views_test',
@ -654,7 +654,7 @@ class FilterStringTest extends HandlerTestBase {
// Filter: Name, Operator: longerthan, Value: 4
$filters['name']['group_info']['default_group'] = 5;
$view->setDisplay('page_1');
$view->display['page_1']->handler->override_option('filters', $filters);
$view->display['page_1']->handler->overrideOption('filters', $filters);
$this->executeView($view);
$resultset = array(
@ -670,7 +670,7 @@ class FilterStringTest extends HandlerTestBase {
$view = $this->getBasicView();
// Change the filtering
$view->display['default']->handler->override_option('filters', array(
$view->display['default']->handler->overrideOption('filters', array(
'description' => array(
'id' => 'description',
'table' => 'views_test',
@ -696,7 +696,7 @@ class FilterStringTest extends HandlerTestBase {
// Filter: Description, Operator: empty, Value:
$filters['description']['group_info']['default_group'] = 7;
$view->setDisplay('page_1');
$view->display['page_1']->handler->override_option('filters', $filters);
$view->display['page_1']->handler->overrideOption('filters', $filters);
$this->executeView($view);
$resultset = array(

View File

@ -157,7 +157,7 @@ class SortDateTest extends HandlerTestBase {
$view = $this->getBasicView();
// Change the fields.
$view->display['default']->handler->override_option('fields', array(
$view->display['default']->handler->overrideOption('fields', array(
'name' => array(
'id' => 'name',
'table' => 'views_test',
@ -173,7 +173,7 @@ class SortDateTest extends HandlerTestBase {
));
// Change the ordering
$view->display['default']->handler->override_option('sorts', array(
$view->display['default']->handler->overrideOption('sorts', array(
'created' => array(
'id' => 'created',
'table' => 'views_test',

View File

@ -49,7 +49,7 @@ class SortRandomTest extends HandlerTestBase {
$view = $this->getBasicView();
// Add a random ordering.
$view->display['default']->handler->override_option('sorts', array(
$view->display['default']->handler->overrideOption('sorts', array(
'random' => array(
'id' => 'random',
'field' => 'random',

View File

@ -33,7 +33,7 @@ class SortTest extends HandlerTestBase {
$view = $this->getBasicView();
// Change the ordering
$view->display['default']->handler->override_option('sorts', array(
$view->display['default']->handler->overrideOption('sorts', array(
'age' => array(
'order' => 'ASC',
'id' => 'age',
@ -56,7 +56,7 @@ class SortTest extends HandlerTestBase {
$view = $this->getBasicView();
// Reverse the ordering
$view->display['default']->handler->override_option('sorts', array(
$view->display['default']->handler->overrideOption('sorts', array(
'age' => array(
'order' => 'DESC',
'id' => 'age',
@ -84,7 +84,7 @@ class SortTest extends HandlerTestBase {
$view = $this->getBasicView();
// Change the ordering
$view->display['default']->handler->override_option('sorts', array(
$view->display['default']->handler->overrideOption('sorts', array(
'name' => array(
'order' => 'ASC',
'id' => 'name',
@ -107,7 +107,7 @@ class SortTest extends HandlerTestBase {
$view = $this->getBasicView();
// Reverse the ordering
$view->display['default']->handler->override_option('sorts', array(
$view->display['default']->handler->overrideOption('sorts', array(
'name' => array(
'order' => 'DESC',
'id' => 'name',

View File

@ -27,7 +27,7 @@ class ArgumentLanguage extends LanguageTestBase {
public function testFilter() {
foreach (array('en' => 'John', 'xx-lolspeak' => 'George') as $langcode => $name) {
$view = $this->getBasicView();
$view->display['default']->handler->override_option('arguments', array(
$view->display['default']->handler->overrideOption('arguments', array(
'langcode' => array(
'id' => 'langcode',
'table' => 'views_test',

View File

@ -26,7 +26,7 @@ class FieldLanguage extends LanguageTestBase {
public function testField() {
$view = $this->getBasicView();
$view->display['default']->handler->override_option('fields', array(
$view->display['default']->handler->overrideOption('fields', array(
'langcode' => array(
'id' => 'langcode',
'table' => 'views_test',

View File

@ -27,7 +27,7 @@ class FilterLanguage extends LanguageTestBase {
public function testFilter() {
foreach (array('en' => 'John', 'xx-lolspeak' => 'George') as $langcode => $name) {
$view = $this->getBasicView();
$view->display['default']->handler->override_option('filters', array(
$view->display['default']->handler->overrideOption('filters', array(
'langcode' => array(
'id' => 'langcode',
'table' => 'views_test',

View File

@ -58,7 +58,7 @@ class AccessTest extends PluginTestBase {
$view = $this->view_access_perm();
$view->setDisplay('default');
$access_plugin = $view->display_handler->get_plugin('access');
$access_plugin = $view->display_handler->getPlugin('access');
$this->assertTrue($view->display_handler->access($this->admin_user), t('Admin-Account should be able to access the view everytime'));
$this->assertFalse($view->display_handler->access($this->web_user));
@ -72,7 +72,7 @@ class AccessTest extends PluginTestBase {
$view = $this->view_access_role();
$view->setDisplay('default');
$access_plugin = $view->display_handler->get_plugin('access');
$access_plugin = $view->display_handler->getPlugin('access');
$this->assertTrue($view->display_handler->access($this->admin_user), t('Admin-Account should be able to access the view everytime'));
$this->assertFalse($view->display_handler->access($this->web_user));
@ -90,7 +90,7 @@ class AccessTest extends PluginTestBase {
$view = $this->view_access_static();
$view->setDisplay('default');
$access_plugin = $view->display_handler->get_plugin('access');
$access_plugin = $view->display_handler->getPlugin('access');
$this->assertFalse($access_plugin->access($this->normal_user));
@ -121,7 +121,7 @@ class AccessTest extends PluginTestBase {
variable_set('test_dynamic_access_argument2', $argument2);
$view->setDisplay('default');
$access_plugin = $view->display_handler->get_plugin('access');
$access_plugin = $view->display_handler->getPlugin('access');
$this->assertFalse($access_plugin->access($this->normal_user));

View File

@ -44,7 +44,7 @@ class CacheTest extends PluginTestBase {
// Set up the fields we need.
$display = $view->new_display('default', 'Master', 'default');
$display->override_option('fields', array(
$display->overrideOption('fields', array(
'id' => array(
'id' => 'id',
'table' => 'views_test',
@ -66,7 +66,7 @@ class CacheTest extends PluginTestBase {
));
// Set up the sort order.
$display->override_option('sorts', array(
$display->overrideOption('sorts', array(
'id' => array(
'order' => 'ASC',
'id' => 'id',
@ -88,7 +88,7 @@ class CacheTest extends PluginTestBase {
// Create a basic result which just 2 results.
$view = $this->getBasicView();
$view->setDisplay();
$view->display_handler->override_option('cache', array(
$view->display_handler->overrideOption('cache', array(
'type' => 'time',
'results_lifespan' => '3600',
'output_lifespan' => '3600',
@ -109,7 +109,7 @@ class CacheTest extends PluginTestBase {
// The Result should be the same as before, because of the caching.
$view = $this->getBasicView();
$view->setDisplay();
$view->display_handler->override_option('cache', array(
$view->display_handler->overrideOption('cache', array(
'type' => 'time',
'results_lifespan' => '3600',
'output_lifespan' => '3600',
@ -129,7 +129,7 @@ class CacheTest extends PluginTestBase {
// Create a basic result which just 2 results.
$view = $this->getBasicView();
$view->setDisplay();
$view->display_handler->override_option('cache', array(
$view->display_handler->overrideOption('cache', array(
'type' => 'none',
));
@ -149,7 +149,7 @@ class CacheTest extends PluginTestBase {
// The Result changes, because the view is not cached.
$view = $this->getBasicView();
$view->setDisplay();
$view->display_handler->override_option('cache', array(
$view->display_handler->overrideOption('cache', array(
'type' => 'none',
));
@ -168,7 +168,7 @@ class CacheTest extends PluginTestBase {
$view = $this->getBasicView();
$view->initDisplay();
$view->name = 'test_cache_header_storage';
$view->display_handler->override_option('cache', array(
$view->display_handler->overrideOption('cache', array(
'type' => 'time',
'output_lifespan' => '3600',
));

View File

@ -30,9 +30,9 @@ class DisplayTest extends PluginTestBase {
$view->initDisplay();
// mark is as overridden, yes FALSE, means overridden.
$view->display['page']->handler->set_override('filter_groups', FALSE);
$this->assertFalse($view->display['page']->handler->is_defaulted('filter_groups'), "Take sure that 'filter_groups' is marked as overridden.");
$this->assertFalse($view->display['page']->handler->is_defaulted('filters'), "Take sure that 'filters'' is marked as overridden.");
$view->display['page']->handler->setOverride('filter_groups', FALSE);
$this->assertFalse($view->display['page']->handler->isDefaulted('filter_groups'), "Take sure that 'filter_groups' is marked as overridden.");
$this->assertFalse($view->display['page']->handler->isDefaulted('filters'), "Take sure that 'filters'' is marked as overridden.");
}
/**

View File

@ -45,10 +45,10 @@ class ExposedFormTest extends PluginTestBase {
$view = views_get_view('test_rename_reset_button');
$view->setDisplay('default');
$exposed_form = $view->display_handler->get_option('exposed_form');
$exposed_form = $view->display_handler->getOption('exposed_form');
$exposed_form['options']['reset_button_label'] = $expected_label = $this->randomName();
$exposed_form['options']['reset_button'] = TRUE;
$view->display_handler->set_option('exposed_form', $exposed_form);
$view->display_handler->setOption('exposed_form', $exposed_form);
$view->save();
views_invalidate_cache();

View File

@ -143,7 +143,7 @@ class PagerTest extends PluginTestBase {
'offset' => 3,
),
);
$view->display_handler->set_option('pager', $pager);
$view->display_handler->setOption('pager', $pager);
$this->executeView($view);
$this->assertEqual(count($view->result), 8, 'Make sure that every item beside the first three is returned in the result');
@ -221,7 +221,7 @@ class PagerTest extends PluginTestBase {
'items_per_page' => 5,
),
);
$view->display_handler->set_option('pager', $pager);
$view->display_handler->setOption('pager', $pager);
$this->executeView($view);
$this->assertEqual(count($view->result), 3, 'Make sure that only a certain count of items is returned');
@ -280,7 +280,7 @@ class PagerTest extends PluginTestBase {
'items_per_page' => 5,
),
);
$view->display_handler->set_option('pager', $pager);
$view->display_handler->setOption('pager', $pager);
$this->executeView($view);
$this->assertEqual(count($view->result), 3, 'Make sure that only a certain count of items is returned');
@ -308,7 +308,7 @@ class PagerTest extends PluginTestBase {
),
);
$view->display_handler->set_option('pager', $pager);
$view->display_handler->setOption('pager', $pager);
$this->executeView($view);
$this->assertEqual($view->pager->get_items_per_page(), 0);
$this->assertEqual(count($view->result), 11);

View File

@ -41,13 +41,13 @@ class StyleTest extends PluginTestBase {
// Reduce the amount of items to make the test a bit easier.
// Set up the pager.
$view->display['default']->handler->override_option('pager', array(
$view->display['default']->handler->overrideOption('pager', array(
'type' => 'some',
'options' => array('items_per_page' => 3),
));
// Add the job field .
$view->display['default']->handler->override_option('fields', array(
$view->display['default']->handler->overrideOption('fields', array(
'name' => array(
'id' => 'name',
'table' => 'views_test',
@ -140,13 +140,13 @@ class StyleTest extends PluginTestBase {
// Reduce the amount of items to make the test a bit easier.
// Set up the pager.
$view->display['default']->handler->override_option('pager', array(
$view->display['default']->handler->overrideOption('pager', array(
'type' => 'some',
'options' => array('items_per_page' => 3),
));
// Add the job and age field.
$view->display['default']->handler->override_option('fields', array(
$view->display['default']->handler->overrideOption('fields', array(
'name' => array(
'id' => 'name',
'table' => 'views_test',

View File

@ -390,7 +390,7 @@ abstract class ViewTestBase extends WebTestBase {
// Set up the fields we need.
$display = $view->new_display('default', 'Master', 'default');
$display->override_option('fields', array(
$display->overrideOption('fields', array(
'id' => array(
'id' => 'id',
'table' => 'views_test',
@ -412,7 +412,7 @@ abstract class ViewTestBase extends WebTestBase {
));
// Set up the sort order.
$display->override_option('sorts', array(
$display->overrideOption('sorts', array(
'id' => array(
'order' => 'ASC',
'id' => 'id',
@ -423,7 +423,7 @@ abstract class ViewTestBase extends WebTestBase {
));
// Set up the pager.
$display->override_option('pager', array(
$display->overrideOption('pager', array(
'type' => 'none',
'options' => array('offset' => 0),
));

View File

@ -421,7 +421,7 @@ class View extends ViewStorage {
// default display. If they are, store them on this display. This way,
// multiple displays in the same view can share the same filters and
// remember settings.
$display_id = ($this->display_handler->is_defaulted('filters')) ? 'default' : $this->current_display;
$display_id = ($this->display_handler->isDefaulted('filters')) ? 'default' : $this->current_display;
if (empty($this->exposed_input) && !empty($_SESSION['views'][$this->name][$display_id])) {
$this->exposed_input = $_SESSION['views'][$this->name][$display_id];
@ -555,8 +555,8 @@ class View extends ViewStorage {
}
if (!isset($this->plugin_name)) {
$this->plugin_name = $this->display_handler->get_option('style_plugin');
$this->style_options = $this->display_handler->get_option('style_options');
$this->plugin_name = $this->display_handler->getOption('style_plugin');
$this->style_options = $this->display_handler->getOption('style_options');
}
$this->style_plugin = views_get_plugin('style', $this->plugin_name);
@ -593,7 +593,7 @@ class View extends ViewStorage {
// For each relationship we have, make sure we mark the base it provides as
// available.
foreach ($this->display_handler->get_option('relationships') as $id => $options) {
foreach ($this->display_handler->getOption('relationships') as $id => $options) {
$options['table'] = views_move_table($options['table']);
$data = views_fetch_data($options['table'], FALSE);
if (isset($data[$options['field']]['relationship']['base'])) {
@ -606,7 +606,7 @@ class View extends ViewStorage {
$types = View::viewsObjectTypes();
foreach ($types as $key => $info) {
foreach ($this->display_handler->get_option($info['plural']) as $id => $options) {
foreach ($this->display_handler->getOption($info['plural']) as $id => $options) {
$options['table'] = views_move_table($options['table']);
$data = views_fetch_data($options['table'], FALSE);
@ -644,14 +644,14 @@ class View extends ViewStorage {
$relationship = $this->add_item($this->current_display, 'relationship', $info['table'], $info['field'], $relationship_options);
}
foreach ($handlers as $handler) {
$options = $this->display_handler->get_option($types[$handler['type']]['plural']);
$options = $this->display_handler->getOption($types[$handler['type']]['plural']);
if ($relationship) {
$options[$handler['id']]['relationship'] = $relationship;
}
else {
unset($options[$handler['id']]);
}
$this->display_handler->set_option($types[$handler['type']]['plural'], $options);
$this->display_handler->setOption($types[$handler['type']]['plural'], $options);
}
}
}
@ -678,7 +678,7 @@ class View extends ViewStorage {
*/
public function initPager() {
if (!isset($this->pager)) {
$this->pager = $this->display_handler->get_plugin('pager');
$this->pager = $this->display_handler->getPlugin('pager');
if ($this->pager->use_pager()) {
$this->pager->set_current_page($this->current_page);
@ -717,7 +717,7 @@ class View extends ViewStorage {
'#global' => TRUE,
);
foreach ($this->display_handler->get_handlers('relationship') as $handler) {
foreach ($this->display_handler->getHandlers('relationship') as $handler) {
$base_tables[$handler->definition['base']] = TRUE;
}
return $base_tables;
@ -760,7 +760,7 @@ class View extends ViewStorage {
*/
protected function _initHandler($key, $info) {
// Load the requested items from the display onto the object.
$this->$key = $this->display_handler->get_handlers($key);
$this->$key = $this->display_handler->getHandlers($key);
// This reference deals with difficult PHP indirection.
$handlers = &$this->$key;
@ -787,7 +787,7 @@ class View extends ViewStorage {
$position = -1;
// Create a title for use in the breadcrumb trail.
$title = $this->display_handler->get_option('title');
$title = $this->display_handler->getOption('title');
$this->build_info['breadcrumb'] = array();
$breadcrumb_args = array();
@ -831,7 +831,7 @@ class View extends ViewStorage {
}
else {
$arg_title = $argument->get_title();
$argument->query($this->display_handler->use_group_by());
$argument->query($this->display_handler->useGroupBy());
}
// Add this argument's substitution
@ -840,7 +840,7 @@ class View extends ViewStorage {
// Since we're really generating the breadcrumb for the item above us,
// check the default action of this argument.
if ($this->display_handler->uses_breadcrumb() && $argument->uses_breadcrumb()) {
if ($this->display_handler->usesBreadcrumb() && $argument->uses_breadcrumb()) {
$path = $this->getUrl($breadcrumb_args);
if (strpos($path, '%') === FALSE) {
if (!empty($argument->options['breadcrumb_enable']) && !empty($argument->options['breadcrumb'])) {
@ -904,7 +904,7 @@ class View extends ViewStorage {
}
// Load the options.
$query_options = $this->display_handler->get_option('query');
$query_options = $this->display_handler->getOption('query');
// Create and initialize the query object.
$plugin = !empty($views_data['table']['base']['query class']) ? $views_data['table']['base']['query class'] : 'views_query';
@ -963,8 +963,8 @@ class View extends ViewStorage {
// Let the handlers interact with each other if they really want.
$this->_preQuery();
if ($this->display_handler->uses_exposed()) {
$exposed_form = $this->display_handler->get_plugin('exposed_form');
if ($this->display_handler->usesExposed()) {
$exposed_form = $this->display_handler->getPlugin('exposed_form');
$this->exposed_widgets = $exposed_form->render_exposed_form();
if (form_set_error() || !empty($this->build_info['abort'])) {
$this->built = TRUE;
@ -979,7 +979,7 @@ class View extends ViewStorage {
// Set the filtering groups.
if (!empty($this->filter)) {
$filter_groups = $this->display_handler->get_option('filter_groups');
$filter_groups = $this->display_handler->getOption('filter_groups');
if ($filter_groups) {
$this->query->set_group_operator($filter_groups['operator']);
foreach ($filter_groups['groups'] as $id => $operator) {
@ -1028,10 +1028,10 @@ class View extends ViewStorage {
$this->_build('empty');
// Allow display handler to affect the query:
$this->display_handler->query($this->display_handler->use_group_by());
$this->display_handler->query($this->display_handler->useGroupBy());
// Allow style handler to affect the query:
$this->style_plugin->query($this->display_handler->use_group_by());
$this->style_plugin->query($this->display_handler->useGroupBy());
// Allow exposed form to affect the query:
if (isset($exposed_form)) {
@ -1102,7 +1102,7 @@ class View extends ViewStorage {
}
}
$handlers[$id]->set_relationship();
$handlers[$id]->query($this->display_handler->use_group_by());
$handlers[$id]->query($this->display_handler->useGroupBy());
}
}
}
@ -1130,7 +1130,7 @@ class View extends ViewStorage {
}
// Don't allow to use deactivated displays, but display them on the live preview.
if (!$this->display[$this->current_display]->handler->get_option('enabled') && empty($this->live_preview)) {
if (!$this->display[$this->current_display]->handler->getOption('enabled') && empty($this->live_preview)) {
$this->build_info['fail'] = TRUE;
return FALSE;
}
@ -1146,7 +1146,7 @@ class View extends ViewStorage {
$cache = FALSE;
}
else {
$cache = $this->display_handler->get_plugin('cache');
$cache = $this->display_handler->getPlugin('cache');
}
if ($cache && $cache->cache_get('results')) {
if ($this->pager->use_pager()) {
@ -1208,7 +1208,7 @@ class View extends ViewStorage {
$this->startQueryCapture();
}
$exposed_form = $this->display_handler->get_plugin('exposed_form');
$exposed_form = $this->display_handler->getPlugin('exposed_form');
$exposed_form->pre_render($this->result);
// Check for already-cached output.
@ -1216,7 +1216,7 @@ class View extends ViewStorage {
$cache = FALSE;
}
else {
$cache = $this->display_handler->get_plugin('cache');
$cache = $this->display_handler->getPlugin('cache');
}
if ($cache && $cache->cache_get('output')) {
}
@ -1398,7 +1398,7 @@ class View extends ViewStorage {
$this->dom_id = !empty($this->dom_id) ? $this->dom_id : md5($this->name . REQUEST_TIME . rand());
// Allow the display handler to set up for execution
$this->display_handler->pre_execute();
$this->display_handler->preExecute();
}
/**
@ -1431,7 +1431,7 @@ class View extends ViewStorage {
// Give other displays an opportunity to attach to the view.
foreach ($this->display as $id => $display) {
if (!empty($this->display[$id]->handler)) {
$this->display[$id]->handler->attach_to($this->current_display);
$this->display[$id]->handler->attachTo($this->current_display);
}
}
$this->is_attachment = FALSE;
@ -1455,7 +1455,7 @@ class View extends ViewStorage {
// Execute the view
if (isset($this->display_handler)) {
return $this->display_handler->execute_hook_menu($callbacks);
return $this->display_handler->executeHookMenu($callbacks);
}
}
@ -1473,7 +1473,7 @@ class View extends ViewStorage {
// Execute the view
if (isset($this->display_handler)) {
return $this->display_handler->execute_hook_block_list();
return $this->display_handler->executeHookBlockList();
}
}
@ -1548,7 +1548,7 @@ class View extends ViewStorage {
$title = $this->build_info['title'];
}
else {
$title = $this->display_handler->get_option('title');
$title = $this->display_handler->getOption('title');
}
// Allow substitutions from the first row.
@ -1677,7 +1677,7 @@ class View extends ViewStorage {
return FALSE;
}
}
return $this->display_handler->get_path();
return $this->display_handler->getPath();
}
/**

View File

@ -220,7 +220,7 @@ class ViewStorage extends ConfigurableBase implements ViewStorageInterface {
$types = View::viewsObjectTypes();
$this->setDisplay($display_id);
$fields = $this->display[$display_id]->handler->get_option($types[$type]['plural']);
$fields = $this->display[$display_id]->handler->getOption($types[$type]['plural']);
if (empty($id)) {
$id = $this->generate_item_id($field, $fields);
@ -238,7 +238,7 @@ class ViewStorage extends ConfigurableBase implements ViewStorageInterface {
'field' => $field,
) + $options;
$this->display[$display_id]->handler->set_option($types[$type]['plural'], $fields);
$this->display[$display_id]->handler->setOption($types[$type]['plural'], $fields);
return $id;
}
@ -264,7 +264,7 @@ class ViewStorage extends ConfigurableBase implements ViewStorageInterface {
// Get info about the types so we can get the right data.
$types = View::viewsObjectTypes();
return $this->display[$display_id]->handler->get_option($types[$type]['plural']);
return $this->display[$display_id]->handler->getOption($types[$type]['plural']);
}
/**
@ -288,7 +288,7 @@ class ViewStorage extends ConfigurableBase implements ViewStorageInterface {
$this->setDisplay($display_id);
// Get the existing configuration
$fields = $this->display[$display_id]->handler->get_option($types[$type]['plural']);
$fields = $this->display[$display_id]->handler->getOption($types[$type]['plural']);
return isset($fields[$id]) ? $fields[$id] : NULL;
}
@ -314,7 +314,7 @@ class ViewStorage extends ConfigurableBase implements ViewStorageInterface {
$this->setDisplay($display_id);
// Get the existing configuration.
$fields = $this->display[$display_id]->handler->get_option($types[$type]['plural']);
$fields = $this->display[$display_id]->handler->getOption($types[$type]['plural']);
if (isset($item)) {
$fields[$id] = $item;
}
@ -323,7 +323,7 @@ class ViewStorage extends ConfigurableBase implements ViewStorageInterface {
}
// Store.
$this->display[$display_id]->handler->set_option($types[$type]['plural'], $fields);
$this->display[$display_id]->handler->setOption($types[$type]['plural'], $fields);
}
/**

View File

@ -120,7 +120,7 @@ class Field extends FieldPluginBase {
// base table of the view is the base table of the current field.
// For example a field from a node author on a node view does have users as base table.
if (!empty($this->options['relationship']) && $this->options['relationship'] != 'none') {
$relationships = $this->view->display_handler->get_option('relationships');
$relationships = $this->view->display_handler->getOption('relationships');
if (!empty($relationships[$this->options['relationship']])) {
$options = $relationships[$this->options['relationship']];
$data = views_fetch_data($options['table']);

View File

@ -32,9 +32,9 @@ class Score extends Numeric {
}
function options_form(&$form, &$form_state) {
$style_options = $this->view->display_handler->get_option('style_options');
$style_options = $this->view->display_handler->getOption('style_options');
if (isset($style_options['default']) && $style_options['default'] == $this->options['id']) {
$handlers = $this->view->display_handler->get_handlers('field');
$handlers = $this->view->display_handler->getHandlers('field');
$options = array('' => t('No alternate'));
foreach ($handlers as $id => $handler) {
$options[$id] = $handler->ui_name();

View File

@ -240,7 +240,7 @@ class TaxonomyIndexTid extends ManyToOne {
// If view is an attachment and is inheriting exposed filters, then assume
// exposed input has already been validated
if (!empty($this->view->is_attachment) && $this->view->display_handler->uses_exposed()) {
if (!empty($this->view->is_attachment) && $this->view->display_handler->usesExposed()) {
$this->validated_exposed_input = (array) $this->view->exposed_raw_input[$this->options['expose']['identifier']];
}

View File

@ -646,7 +646,7 @@ function node_row_node_view_preprocess_node(&$vars) {
$options = $vars['view']->style_plugin->row_plugin->options;
// Prevent the comment form from showing up if this is not a page display.
if ($vars['view_mode'] == 'full' && !$vars['view']->display_handler->has_path()) {
if ($vars['view_mode'] == 'full' && !$vars['view']->display_handler->hasPath()) {
$node->comment = FALSE;
}
@ -681,9 +681,9 @@ function node_views_analyze($view) {
if (empty($display->handler)) {
continue;
}
if (!$display->handler->is_defaulted('access') || !$display->handler->is_defaulted('filters')) {
if (!$display->handler->isDefaulted('access') || !$display->handler->isDefaulted('filters')) {
// check for no access control
$access = $display->handler->get_option('access');
$access = $display->handler->getOption('access');
if (empty($access['type']) || $access['type'] == 'none') {
$select = db_select('role', 'r');
$select->innerJoin('role_permission', 'p', 'r.rid = p.rid');
@ -700,7 +700,7 @@ function node_views_analyze($view) {
if (!($roles['anonymous']->safe && $roles['authenticated']->safe)) {
$ret[] = Analyzer::formatMessage(t('Some roles lack permission to access content, but display %display has no access control.', array('%display' => $display->display_title)), 'warning');
}
$filters = $display->handler->get_option('filters');
$filters = $display->handler->getOption('filters');
foreach ($filters as $filter) {
if ($filter['table'] == 'node' && ($filter['field'] == 'status' || $filter['field'] == 'status_extra')) {
continue 2;
@ -713,7 +713,7 @@ function node_views_analyze($view) {
}
foreach ($view->display as $id => $display) {
if ($display->display_plugin == 'page') {
if ($display->handler->get_option('path') == 'node/%') {
if ($display->handler->getOption('path') == 'node/%') {
$ret[] = Analyzer::formatMessage(t('Display %display has set node/% as path. This will not produce what you want. If you want to have multiple versions of the node view, use panels.', array('%display' => $display->display_title)), 'warning');
}
}

View File

@ -61,7 +61,7 @@ function template_preprocess_views_view(&$vars) {
$vars['attributes']['class'][] = 'view-id-' . $vars['name'];
$vars['attributes']['class'][] = 'view-display-id-' . $vars['display_id'];
$css_class = $view->display_handler->get_option('css_class');
$css_class = $view->display_handler->getOption('css_class');
if (!empty($css_class)) {
$vars['css_class'] = preg_replace('/[^a-zA-Z0-9- ]/', '-', $css_class);
$vars['attributes']['class'][] = $vars['css_class'];
@ -69,14 +69,14 @@ function template_preprocess_views_view(&$vars) {
$empty = empty($vars['rows']);
$vars['header'] = $view->display_handler->render_area('header', $empty);
$vars['footer'] = $view->display_handler->render_area('footer', $empty);
$vars['header'] = $view->display_handler->renderArea('header', $empty);
$vars['footer'] = $view->display_handler->renderArea('footer', $empty);
if ($empty) {
$vars['empty'] = $view->display_handler->render_area('empty', $empty);
$vars['empty'] = $view->display_handler->renderArea('empty', $empty);
}
$vars['exposed'] = !empty($view->exposed_widgets) ? $view->exposed_widgets : '';
$vars['more'] = $view->display_handler->render_more_link();
$vars['more'] = $view->display_handler->renderMoreLink();
$vars['feed_icon'] = !empty($view->feed_icon) ? $view->feed_icon : '';
$vars['pager'] = '';
@ -85,7 +85,7 @@ function template_preprocess_views_view(&$vars) {
// Render title for the admin preview.
$vars['title'] = !empty($view->views_ui_context) ? filter_xss_admin($view->getTitle()) : '';
if ($view->display_handler->render_pager()) {
if ($view->display_handler->renderPager()) {
$exposed_input = isset($view->exposed_raw_input) ? $view->exposed_raw_input : NULL;
$vars['pager'] = $view->renderPager($exposed_input);
}
@ -633,7 +633,7 @@ function template_preprocess_views_view_table(&$vars) {
$vars['attributes']['class'] = array('views-table');
if (empty($vars['rows']) && !empty($options['empty_table'])) {
$vars['rows'][0][0] = $view->display_handler->render_area('empty');
$vars['rows'][0][0] = $view->display_handler->renderArea('empty');
// Calculate the amounts of rows with output.
$vars['field_attributes'][0][0]['colspan'] = count($vars['header']);
$vars['field_classes'][0][0] = 'views-empty';
@ -852,7 +852,7 @@ function template_preprocess_views_view_rss(&$vars) {
// escaped source data (such as &amp becoming &amp;amp;).
$vars['description'] = check_plain(decode_entities(strip_tags($style->get_description())));
if ($view->display_handler->get_option('sitename_title')) {
if ($view->display_handler->getOption('sitename_title')) {
$title = $config->get('name');
if ($slogan = $config->get('slogan')) {
$title .= ' - ' . $slogan;
@ -865,9 +865,9 @@ function template_preprocess_views_view_rss(&$vars) {
// Figure out which display which has a path we're using for this feed. If there isn't
// one, use the global $base_url
$link_display_id = $view->display_handler->get_link_display();
$link_display_id = $view->display_handler->getLinkDisplay();
if ($link_display_id && !empty($view->display[$link_display_id])) {
$path = $view->display[$link_display_id]->handler->get_path();
$path = $view->display[$link_display_id]->handler->getPath();
}
if ($path) {

View File

@ -396,7 +396,7 @@ function views_preprocess_node(&$vars) {
// If a node is being rendered in a view, and the view does not have a path,
// prevent drupal from accidentally setting the $page variable:
if ($vars['page'] && $vars['view_mode'] == 'full' && !$vars['view']->display_handler->has_path()) {
if ($vars['page'] && $vars['view_mode'] == 'full' && !$vars['view']->display_handler->hasPath()) {
$vars['page'] = FALSE;
}
}
@ -700,14 +700,14 @@ function views_block_info() {
foreach ($view->display as $display_id => $display) {
if (isset($display->handler) && !empty($display->handler->definition['uses_hook_block'])) {
$result = $display->handler->execute_hook_block_list();
$result = $display->handler->executeHookBlockList();
if (is_array($result)) {
$items = array_merge($items, $result);
}
}
if (isset($display->handler) && $display->handler->get_option('exposed_block')) {
$result = $display->handler->get_special_blocks();
if (isset($display->handler) && $display->handler->getOption('exposed_block')) {
$result = $display->handler->getSpecialBlocks();
if (is_array($result)) {
$items = array_merge($items, $result);
}
@ -769,7 +769,7 @@ function views_block_view($delta) {
if ($view->access($display_id)) {
$view->setDisplay($display_id);
if (isset($view->display_handler)) {
$output = $view->display_handler->view_special_blocks($type);
$output = $view->display_handler->viewSpecialBlocks($type);
// Before returning the block output, convert it to a renderable
// array with contextual links.
views_add_block_contextual_links($output, $view, $display_id, 'special_block_' . $type);
@ -1546,7 +1546,7 @@ function views_get_applicable_views($type) {
// This view uses_hook_menu. Clone it so that different handlers
// don't trip over each other, and add it to the list.
$v = $view->cloneView();
if ($v->setDisplay($id) && $v->display_handler->get_option('enabled')) {
if ($v->setDisplay($id) && $v->display_handler->getOption('enabled')) {
$result[] = array($v, $id);
}
// In PHP 4.4.7 and presumably earlier, if we do not unset $v
@ -2049,7 +2049,7 @@ function views_exposed_form($form, &$form_state) {
'#id' => drupal_html_id('edit-submit-' . $view->name),
);
$form['#action'] = url($view->display_handler->get_url());
$form['#action'] = url($view->display_handler->getUrl());
$form['#theme'] = views_theme_functions('views_exposed_form', $view, $display);
$form['#id'] = drupal_clean_css_identifier('views_exposed_form-' . check_plain($view->name) . '-' . check_plain($display->id));
// $form['#attributes']['class'] = array('views-exposed-form');

View File

@ -474,7 +474,7 @@ function theme_views_ui_view_preview_section($vars) {
*/
function views_ui_view_preview_section_handler_links($view, $type, $title = FALSE) {
$display = $view->display_handler->display;
$handlers = $view->display_handler->get_handlers($type);
$handlers = $view->display_handler->getHandlers($type);
$links = array();
$types = View::viewsObjectTypes();
@ -766,8 +766,8 @@ function _views_ui_get_paths($view) {
else {
$view->initDisplay(); // Make sure all the handlers are set up
foreach ($view->display as $display) {
if (!empty($display->handler) && $display->handler->has_path()) {
$one_path = $display->handler->get_option('path');
if (!empty($display->handler) && $display->handler->hasPath()) {
$one_path = $display->handler->getOption('path');
if (empty($path_sort)) {
$path_sort = strtolower($one_path);
}