diff --git a/help/api-upgrading.html b/help/api-upgrading.html index f17ff23ae544599b4fee6d06538713ee9ed1e110..a2b9a867ebb6ba9fbdb7886ed4e36ca01f84a17c 100644 --- a/help/api-upgrading.html +++ b/help/api-upgrading.html @@ -107,7 +107,7 @@ <h3>Changed argument settings</h3> ), </pre> -<h3>The introduction of get_value() and sanitize_value()</h3> +<h3>The introduction of get_value() and sanitizeValue()</h3> The views_handler class got two new functions: <pre> /** @@ -133,7 +133,7 @@ <h3>The introduction of get_value() and sanitize_value()</h3> * @param $type * The type of sanitization needed. If not provided, check_plain() is used. */ -function sanitize_value($value, $type = NULL) { +public function sanitizeValue($value, $type = NULL) { switch ($type) { case 'xss': $value = filter_xss($value); @@ -158,7 +158,7 @@ <h3>The introduction of get_value() and sanitize_value()</h3> the backend can just override get_values(), which is significantly less code. Of course, different ways of fetching and displaying data might require different -ways of sanitizing it, hence the usage of the sanitize_value() function. +ways of sanitizing it, hence the usage of the sanitizeValue() function. Examples of converting render() field handler implementations: <pre> @@ -175,12 +175,12 @@ <h3>The introduction of get_value() and sanitize_value()</h3> // Instead of this: return check_plain($value); // We write: -return $this->sanitize_value($value); +return $this->sanitizeValue($value); -// Since sanitize_value() supports different sanitization functions, this: +// Since sanitizeValue() supports different sanitization functions, this: return filter_xss($value); // Can become: -return $this->sanitize_value($value, 'xss'); +return $this->sanitizeValue($value, 'xss'); </pre> diff --git a/includes/admin.inc b/includes/admin.inc index d7e770fdef84f9d181383ffed435a0d68440762b..df3baa854cadf2abe0e95bc9044152bc5b95060d 100644 --- a/includes/admin.inc +++ b/includes/admin.inc @@ -2276,12 +2276,12 @@ function views_ui_edit_form_get_bucket($type, $view, $display) { continue; } - $field_name = check_plain($handler->ui_name(TRUE)); + $field_name = check_plain($handler->uiName(TRUE)); if (!empty($field['relationship']) && !empty($relationships[$field['relationship']])) { $field_name = '(' . $relationships[$field['relationship']] . ') ' . $field_name; } - $description = filter_xss_admin($handler->admin_summary()); + $description = filter_xss_admin($handler->adminSummary()); $link_text = $field_name . (empty($description) ? '' : " ($description)"); $link_attributes = array('class' => array('views-ajax-link')); if (!empty($field['exclude'])) { @@ -2294,11 +2294,11 @@ function views_ui_edit_form_get_bucket($type, $view, $display) { $build['fields'][$id]['#changed'] = TRUE; } - if ($display->handler->useGroupBy() && $handler->use_group_by()) { + if ($display->handler->useGroupBy() && $handler->usesGroupBy()) { $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)); } - if ($handler->has_extra_options()) { + if ($handler->hasExtraOptions()) { $build['fields'][$id]['#settings_links'][] = l('<span class="label">' . t('Settings') . '</span>', "admin/structure/views/nojs/config-item-extra/$view->name/$display->id/$type/$id", array('attributes' => array('class' => array('views-button-configure', 'views-ajax-link'), 'title' => t('Settings')), 'html' => TRUE)); } @@ -3371,7 +3371,7 @@ function views_ui_rearrange_form($form, &$form_state) { ); $handler = $display->handler->getHandler($type, $id); if ($handler) { - $name = $handler->ui_name() . ' ' . $handler->admin_summary(); + $name = $handler->uiName() . ' ' . $handler->adminSummary(); if (!empty($field['relationship']) && !empty($relationships[$field['relationship']])) { $name = '(' . $relationships[$field['relationship']] . ') ' . $name; } @@ -3726,7 +3726,7 @@ function views_ui_rearrange_filter_form($form, &$form_state) { ); if ($handler) { - $name = $handler->ui_name() . ' ' . $handler->admin_summary(); + $name = $handler->uiName() . ' ' . $handler->adminSummary(); if (!empty($field['relationship']) && !empty($relationships[$field['relationship']])) { $name = '(' . $relationships[$field['relationship']] . ') ' . $name; } @@ -4136,12 +4136,12 @@ 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->useGroupBy() && $handler->use_group_by()) { + if ($form_state['view']->display_handler->useGroupBy() && $handler->usesGroupBy()) { views_ui_add_form_to_stack('config-item-group', $form_state['view'], $form_state['display_id'], array($type, $id)); } // check to see if this type has settings, if so add the settings form first - if ($handler && $handler->has_extra_options()) { + if ($handler && $handler->hasExtraOptions()) { views_ui_add_form_to_stack('config-item-extra', $form_state['view'], $form_state['display_id'], array($type, $id)); } // Then add the form to the stack @@ -4293,7 +4293,7 @@ function views_ui_config_item_form($form, &$form_state) { ); } - $form['#title'] = t('Configure @type: @item', array('@type' => $types[$type]['lstitle'], '@item' => $handler->ui_name())); + $form['#title'] = t('Configure @type: @item', array('@type' => $types[$type]['lstitle'], '@item' => $handler->uiName())); if (!empty($handler->definition['help'])) { $form['options']['form_description'] = array( @@ -4476,9 +4476,9 @@ function views_ui_config_item_group_form($type, &$form_state) { $handler->init($view, $item); $types = View::viewsObjectTypes(); - $form['#title'] = t('Configure group settings for @type %item', array('@type' => $types[$type]['lstitle'], '%item' => $handler->ui_name())); + $form['#title'] = t('Configure group settings for @type %item', array('@type' => $types[$type]['lstitle'], '%item' => $handler->uiName())); - $handler->groupby_form($form['options'], $form_state); + $handler->buildGroupByForm($form['options'], $form_state); $form_state['handler'] = &$handler; } @@ -4498,7 +4498,7 @@ function views_ui_config_item_group_form_submit($form, &$form_state) { $handler = views_get_handler($item['table'], $item['field'], $type); $handler->init($form_state['view'], $item); - $handler->groupby_form_submit($form, $form_state); + $handler->submitGroupByForm($form, $form_state); // Store the item back on the view $form_state['view']->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], $item); @@ -4534,7 +4534,7 @@ function views_ui_config_item_form_expose($form, &$form_state) { // If necessary, set new defaults: if ($item['exposed']) { - $form_state['handler']->expose_options(); + $form_state['handler']->defaultExposeOptions(); } $form_state['view']->setItem($form_state['display_id'], $form_state['type'], $form_state['id'], $item); @@ -4577,12 +4577,12 @@ function views_ui_config_item_extra_form($form, &$form_state) { $handler->init($view, $item); $types = View::viewsObjectTypes(); - $form['#title'] = t('Configure extra settings for @type %item', array('@type' => $types[$type]['lstitle'], '%item' => $handler->ui_name())); + $form['#title'] = t('Configure extra settings for @type %item', array('@type' => $types[$type]['lstitle'], '%item' => $handler->uiName())); $form['#section'] = $display_id . '-' . $type . '-' . $id; // Get form from the handler. - $handler->extra_options_form($form['options'], $form_state); + $handler->buildExtraOptionsForm($form['options'], $form_state); $form_state['handler'] = &$handler; } @@ -4595,7 +4595,7 @@ function views_ui_config_item_extra_form($form, &$form_state) { * Validation handler for configing new item(s) to a view. */ function views_ui_config_item_extra_form_validate($form, &$form_state) { - $form_state['handler']->extra_options_validate($form['options'], $form_state); + $form_state['handler']->validateExtraOptionsForm($form['options'], $form_state); } /** @@ -4603,7 +4603,7 @@ function views_ui_config_item_extra_form_validate($form, &$form_state) { */ function views_ui_config_item_extra_form_submit($form, &$form_state) { // Run it through the handler's submit function. - $form_state['handler']->extra_options_submit($form['options'], $form_state); + $form_state['handler']->submitExtraOptionsForm($form['options'], $form_state); $item = $form_state['handler']->options; // Store the data we're given. @@ -4648,7 +4648,7 @@ function views_ui_config_style_form($form, &$form_state) { $handler->init($view, $item); $types = View::viewsObjectTypes(); - $form['#title'] = t('Configure summary style for @type %item', array('@type' => $types[$type]['lstitle'], '%item' => $handler->ui_name())); + $form['#title'] = t('Configure summary style for @type %item', array('@type' => $types[$type]['lstitle'], '%item' => $handler->uiName())); $form['#section'] = $display_id . '-' . $type . '-style-options'; diff --git a/lib/Drupal/views/ManyToOneHelper.php b/lib/Drupal/views/ManyToOneHelper.php index f6b9eb61282b62f5721251153b177ed04c1d83a7..d3410aaa6710035aa6b21787922e92b11034deea 100644 --- a/lib/Drupal/views/ManyToOneHelper.php +++ b/lib/Drupal/views/ManyToOneHelper.php @@ -46,7 +46,7 @@ public function buildOptionsForm(&$form, &$form_state) { * it that option. If it wants us to do this, it must set $helper->formula = TRUE * and implement handler->get_formula(); */ - function get_field() { + public function getField() { if (!empty($this->formula)) { return $this->handler->get_formula(); } @@ -68,7 +68,7 @@ function add_table($join = NULL, $alias = NULL) { $field = $this->handler->relationship . '_' . $this->handler->table . '.' . $this->handler->field; if (empty($join)) { - $join = $this->get_join(); + $join = $this->getJoin(); } // See if there's a chain between us and the base relationship. If so, we need @@ -109,8 +109,8 @@ function add_table($join = NULL, $alias = NULL) { return $alias; } - function get_join() { - return $this->handler->get_join(); + public function getJoin() { + return $this->handler->getJoin(); } /** @@ -119,7 +119,7 @@ function get_join() { */ function summary_join() { $field = $this->handler->relationship . '_' . $this->handler->table . '.' . $this->handler->field; - $join = $this->get_join(); + $join = $this->getJoin(); // shortcuts $options = $this->handler->options; @@ -151,10 +151,10 @@ function summary_join() { } /** - * Override ensure_my_table so we can control how this joins in. + * Override ensureMyTable so we can control how this joins in. * The operator actually has influence over joining. */ - function ensure_my_table() { + public function ensureMyTable() { if (!isset($this->handler->table_alias)) { // Case 1: Operator is an 'or' and we're not reducing duplicates. // We hence get the absolute simplest: @@ -163,7 +163,7 @@ function ensure_my_table() { if (empty($this->handler->options['add_table']) && empty($this->handler->view->many_to_one_tables[$field])) { // query optimization, INNER joins are slightly faster, so use them // when we know we can. - $join = $this->get_join(); + $join = $this->getJoin(); if (isset($join)) { $join->type = 'INNER'; } @@ -171,7 +171,7 @@ function ensure_my_table() { $this->handler->view->many_to_one_tables[$field] = $this->handler->value; } else { - $join = $this->get_join(); + $join = $this->getJoin(); $join->type = 'LEFT'; if (!empty($this->handler->view->many_to_one_tables[$field])) { foreach ($this->handler->view->many_to_one_tables[$field] as $value) { @@ -198,7 +198,7 @@ function ensure_my_table() { // Clone the join for each table: $this->handler->table_aliases = array(); foreach ($this->handler->value as $value) { - $join = $this->get_join(); + $join = $this->getJoin(); if ($this->handler->operator == 'and') { $join->type = 'INNER'; } @@ -230,7 +230,7 @@ function ensure_my_table() { // We just do one join. We'll add a where clause during // the query phase to ensure that $table.$field IS NULL. else { - $join = $this->get_join(); + $join = $this->getJoin(); $join->type = 'LEFT'; $join->extra = array(); $join->extra_type = 'OR'; @@ -251,7 +251,7 @@ function ensure_my_table() { /** * Provides a unique placeholders for handlers. */ - function placeholder() { + protected function placeholder() { return $this->handler->query->placeholder($this->handler->options['table'] . '_' . $this->handler->options['field']); } @@ -259,10 +259,10 @@ function add_filter() { if (empty($this->handler->value)) { return; } - $this->handler->ensure_my_table(); + $this->handler->ensureMyTable(); // Shorten some variables: - $field = $this->get_field(); + $field = $this->getField(); $options = $this->handler->options; $operator = $this->handler->operator; $formula = !empty($this->formula); diff --git a/lib/Drupal/views/Plugin/views/HandlerBase.php b/lib/Drupal/views/Plugin/views/HandlerBase.php index cad342acc9fccc0c02d558f64eb47022b0bc43d1..202da4a706ccea8ccbb3d648ef17adfbc817e0de 100644 --- a/lib/Drupal/views/Plugin/views/HandlerBase.php +++ b/lib/Drupal/views/Plugin/views/HandlerBase.php @@ -78,7 +78,7 @@ abstract class HandlerBase extends PluginBase { * The item from the database; the actual contents of this will vary * based upon the type of handler. */ - function init(&$view, &$options) { + public function init(&$view, &$options) { $this->view = &$view; $display_id = $this->view->current_display; // Check to see if this handler type is defaulted. Note that @@ -143,7 +143,7 @@ protected function defineOptions() { $options['field'] = array('default' => ''); $options['relationship'] = array('default' => 'none'); $options['group_type'] = array('default' => 'group'); - $options['ui_name'] = array('default' => ''); + $options['ui_name'] = array('default' => '', 'translatable' => TRUE); return $options; } @@ -151,7 +151,7 @@ protected function defineOptions() { /** * Return a string representing this handler's name in the UI. */ - function ui_name($short = FALSE) { + public function uiName($short = FALSE) { if (!empty($this->options['ui_name'])) { $title = check_plain($this->options['ui_name']); return $title; @@ -165,9 +165,9 @@ function ui_name($short = FALSE) { * * This should be overridden for handlers with formulae or other * non-standard fields. Because this takes an argument, fields - * overriding this can just call return parent::get_field($formula) + * overriding this can just call return parent::getField($formula) */ - function get_field($field = NULL) { + public function getField($field = NULL) { if (!isset($field)) { if (!empty($this->formula)) { $field = $this->get_formula(); @@ -205,7 +205,7 @@ function get_field($field = NULL) { * @return string * Returns the safe value. */ - function sanitize_value($value, $type = NULL) { + protected function sanitizeValue($value, $type = NULL) { switch ($type) { case 'xss': $value = filter_xss($value); @@ -238,7 +238,7 @@ function sanitize_value($value, $type = NULL) { * @return string * The transformed string. */ - function case_transform($string, $option) { + protected function caseTransform($string, $option) { global $multibyte; switch ($option) { @@ -305,13 +305,13 @@ public function submitOptionsForm(&$form, &$form_state) { } /** * Provides the handler some groupby. */ - function use_group_by() { + public function usesGroupBy() { return TRUE; } /** * Provide a form for aggregation settings. */ - function groupby_form(&$form, &$form_state) { + public function buildGroupByForm(&$form, &$form_state) { $view = &$form_state['view']; $display_id = $form_state['display_id']; $types = View::viewsObjectTypes(); @@ -319,7 +319,7 @@ function groupby_form(&$form, &$form_state) { $id = $form_state['id']; $form['#title'] = check_plain($view->display[$display_id]->display_title) . ': '; - $form['#title'] .= t('Configure aggregation settings for @type %item', array('@type' => $types[$type]['lstitle'], '%item' => $this->ui_name())); + $form['#title'] .= t('Configure aggregation settings for @type %item', array('@type' => $types[$type]['lstitle'], '%item' => $this->uiName())); $form['#section'] = $display_id . '-' . $type . '-' . $id; @@ -342,7 +342,7 @@ function groupby_form(&$form, &$form_state) { * Perform any necessary changes to the form values prior to storage. * There is no need for this function to actually store the data. */ - function groupby_form_submit(&$form, &$form_state) { + public function submitGroupByForm(&$form, &$form_state) { $item =& $form_state['handler']->options; $item['group_type'] = $form_state['values']['options']['group_type']; @@ -352,90 +352,90 @@ function groupby_form_submit(&$form, &$form_state) { * If a handler has 'extra options' it will get a little settings widget and * another form called extra_options. */ - function has_extra_options() { return FALSE; } + public function hasExtraOptions() { return FALSE; } /** * Provide defaults for the handler. */ - function extra_options(&$option) { } + public function defineExtraOptions(&$option) { } /** * Provide a form for setting options. */ - function extra_options_form(&$form, &$form_state) { } + public function buildExtraOptionsForm(&$form, &$form_state) { } /** * Validate the options form. */ - function extra_options_validate($form, &$form_state) { } + public function validateExtraOptionsForm($form, &$form_state) { } /** * Perform any necessary changes to the form values prior to storage. * There is no need for this function to actually store the data. */ - function extra_options_submit($form, &$form_state) { } + public function submitExtraOptionsForm($form, &$form_state) { } /** * Determine if a handler can be exposed. */ - function can_expose() { return FALSE; } + public function canExpose() { return FALSE; } /** * Set new exposed option defaults when exposed setting is flipped * on. */ - function expose_options() { } + public function defaultExposeOptions() { } /** * Get information about the exposed form for the form renderer. */ - function exposed_info() { } + public function exposedInfo() { } /** * Render our chunk of the exposed handler form when selecting */ - function exposed_form(&$form, &$form_state) { } + public function buildExposedForm(&$form, &$form_state) { } /** * Validate the exposed handler form */ - function exposed_validate(&$form, &$form_state) { } + public function validateExposed(&$form, &$form_state) { } /** * Submit the exposed handler form */ - function exposed_submit(&$form, &$form_state) { } + public function submitExposed(&$form, &$form_state) { } /** * Form for exposed handler options. */ - function expose_form(&$form, &$form_state) { } + public function buildExposeForm(&$form, &$form_state) { } /** * Validate the options form. */ - function expose_validate($form, &$form_state) { } + public function validateExposeForm($form, &$form_state) { } /** * Perform any necessary changes to the form exposes prior to storage. * There is no need for this function to actually store the data. */ - function expose_submit($form, &$form_state) { } + public function submitExposeForm($form, &$form_state) { } /** * Shortcut to display the expose/hide button. */ - function show_expose_button(&$form, &$form_state) { } + public function showExposeButton(&$form, &$form_state) { } /** * Shortcut to display the exposed options form. */ - function show_expose_form(&$form, &$form_state) { + public function showExposeForm(&$form, &$form_state) { if (empty($this->options['exposed'])) { return; } - $this->expose_form($form, $form_state); + $this->buildExposeForm($form, $form_state); // When we click the expose button, we add new gadgets to the form but they // have no data in $_POST so their defaults get wiped out. This prevents @@ -455,7 +455,7 @@ function show_expose_form(&$form, &$form_state) { * * @return boolean */ - function access() { + public function access() { if (isset($this->definition['access callback']) && function_exists($this->definition['access callback'])) { if (isset($this->definition['access arguments']) && is_array($this->definition['access arguments'])) { return call_user_func_array($this->definition['access callback'], $this->definition['access arguments']); @@ -472,7 +472,7 @@ function access() { * This gives all the handlers some time to set up before any handler has * been fully run. */ - function pre_query() { } + public function preQuery() { } /** * Run after the view is executed, before the result is cached. @@ -481,12 +481,12 @@ function pre_query() { } * used so that handlers that pull up secondary data can put it in the * $values so that the raw data can be utilized externally. */ - function post_execute(&$values) { } + public function postExecute(&$values) { } /** * Provides a unique placeholders for handlers. */ - function placeholder() { + protected function placeholder() { return $this->query->placeholder($this->options['table'] . '_' . $this->options['field']); } @@ -494,7 +494,7 @@ function placeholder() { * Called just prior to query(), this lets a handler set up any relationship * it needs. */ - function set_relationship() { + public function setRelationship() { // Ensure this gets set to something. $this->relationship = NULL; @@ -524,7 +524,7 @@ function set_relationship() { * Ensure the main table for this handler is in the query. This is used * a lot. */ - function ensure_my_table() { + public function ensureMyTable() { if (!isset($this->table_alias)) { $this->table_alias = $this->query->ensure_table($this->table, $this->relationship); } @@ -534,14 +534,14 @@ function ensure_my_table() { /** * Provide text for the administrative summary */ - function admin_summary() { } + public function adminSummary() { } /** * Determine if the argument needs a style plugin. * * @return TRUE/FALSE */ - function needs_style_plugin() { return FALSE; } + public function needsStylePlugin() { return FALSE; } /** * Determine if this item is 'exposed', meaning it provides form elements @@ -549,31 +549,31 @@ function needs_style_plugin() { return FALSE; } * * @return TRUE/FALSE */ - function is_exposed() { + public function isExposed() { return !empty($this->options['exposed']); } /** * Returns TRUE if the exposed filter works like a grouped filter. */ - function is_a_group() { return FALSE; } + public function isAGroup() { return FALSE; } /** * Define if the exposed input has to be submitted multiple times. * This is TRUE when exposed filters grouped are using checkboxes as * widgets. */ - function multiple_exposed_input() { return FALSE; } + public function multipleExposedInput() { return FALSE; } /** * Take input from exposed handlers and assign to this handler, if necessary. */ - function accept_exposed_input($input) { return TRUE; } + public function acceptExposedInput($input) { return TRUE; } /** * If set to remember exposed input in the session, store it there. */ - function store_exposed_input($input, $status) { return TRUE; } + public function storeExposedInput($input, $status) { return TRUE; } /** * Get the join object that should be used for this handler. @@ -582,7 +582,7 @@ function store_exposed_input($input, $status) { return TRUE; } * getting the join if it is necessary to make some changes to it, such * as adding an 'extra'. */ - function get_join() { + public function getJoin() { // get the join from this table that links back to the base table. // Determine the primary table to seek if (empty($this->query->relationships[$this->relationship])) { @@ -615,6 +615,6 @@ public function validate() { return array(); } * Determine if the handler is considered 'broken', meaning it's a * a placeholder used when a handler can't be found. */ - function broken() { } + public function broken() { } } diff --git a/lib/Drupal/views/Plugin/views/access/AccessPluginBase.php b/lib/Drupal/views/Plugin/views/access/AccessPluginBase.php index bb38c758861e7a6871cbd1a4b5e2698d7334b689..db06b5c79507c05b9796a54ecb94080455ebc6a0 100644 --- a/lib/Drupal/views/Plugin/views/access/AccessPluginBase.php +++ b/lib/Drupal/views/Plugin/views/access/AccessPluginBase.php @@ -30,7 +30,7 @@ abstract class AccessPluginBase extends PluginBase { * @param $display * The display handler. */ - function init(&$view, &$display) { + public function init(&$view, &$display) { $this->view = &$view; $this->display = &$display; @@ -73,7 +73,7 @@ public function summaryTitle() { /** * Determine if the current user has access or not. */ - function access($account) { + public function access($account) { // default to no access control. return TRUE; } diff --git a/lib/Drupal/views/Plugin/views/access/Permission.php b/lib/Drupal/views/Plugin/views/access/Permission.php index 4c36624154d0158f14ce17f182e02f17b6297782..4d39fc87fe57092dc165244cbb691e06f636dbad 100644 --- a/lib/Drupal/views/Plugin/views/access/Permission.php +++ b/lib/Drupal/views/Plugin/views/access/Permission.php @@ -28,7 +28,7 @@ class Permission extends AccessPluginBase { */ protected $usesOptions = TRUE; - function access($account) { + public function access($account) { return views_check_perm($this->options['perm'], $account); } diff --git a/lib/Drupal/views/Plugin/views/access/Role.php b/lib/Drupal/views/Plugin/views/access/Role.php index 643bd37d8f9498473d3a1fa205ad9e0cf2238d0c..4fafbc3d2579fc68cb40ec6e926f60011e09a233 100644 --- a/lib/Drupal/views/Plugin/views/access/Role.php +++ b/lib/Drupal/views/Plugin/views/access/Role.php @@ -28,7 +28,7 @@ class Role extends AccessPluginBase { */ protected $usesOptions = TRUE; - function access($account) { + public function access($account) { return views_check_roles(array_filter($this->options['role']), $account); } diff --git a/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php b/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php index 6b7a9d098109cccc7d910c659f37fa8982504f0e..b9757a31c35c4ddc7620a68239980ee9f5113ae6 100644 --- a/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php +++ b/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php @@ -30,7 +30,7 @@ abstract class AreaPluginBase extends HandlerBase { * Make sure that no result area handlers are set to be shown when the result * is empty. */ - function init(&$view, &$options) { + public function init(&$view, &$options) { parent::init($view, $options); if ($this->handler_type == 'empty') { $this->options['empty'] = TRUE; @@ -38,9 +38,9 @@ function init(&$view, &$options) { } /** - * Get this field's label. + * Get this area's label. */ - function label() { + public function label() { if (!isset($this->options['label'])) { return $this->ui_name(); } @@ -61,7 +61,7 @@ protected function defineOptions() { /** * Provide extra data to the administration form */ - function admin_summary() { + public function adminSummary() { return $this->label(); } @@ -78,6 +78,7 @@ public function buildOptionsForm(&$form, &$form_state) { '#description' => t('The label for this area that will be displayed only administratively.'), ); + if ($form_state['type'] != 'empty') { $form['empty'] = array( '#type' => 'checkbox', @@ -102,7 +103,7 @@ function render($empty = FALSE) { /** * Area handlers shouldn't have groupby. */ - function use_group_by() { + public function usesGroupBy() { return FALSE; } diff --git a/lib/Drupal/views/Plugin/views/area/Broken.php b/lib/Drupal/views/Plugin/views/area/Broken.php index 56d0124f3a805b50f48536042a066b9860e429a1..760d047d8e30c9aaabe2778fec1e5f03c602b5dd 100644 --- a/lib/Drupal/views/Plugin/views/area/Broken.php +++ b/lib/Drupal/views/Plugin/views/area/Broken.php @@ -20,11 +20,11 @@ */ class Broken extends AreaPluginBase { - function ui_name($short = FALSE) { + public function uiName($short = FALSE) { return t('Broken/missing handler'); } - function ensure_my_table() { /* No table to ensure! */ } + public function ensureMyTable() { /* No table to ensure! */ } public function query($group_by = FALSE) { /* No query to run */ } function render($empty = FALSE) { return ''; } public function buildOptionsForm(&$form, &$form_state) { @@ -36,7 +36,7 @@ public function buildOptionsForm(&$form, &$form_state) { /** * Determine if the handler is considered 'broken' */ - function broken() { + public function broken() { return TRUE; } diff --git a/lib/Drupal/views/Plugin/views/area/Text.php b/lib/Drupal/views/Plugin/views/area/Text.php index 48931c473a49b7a3a4a5d6c984953d548f2041d2..c3563c686f690b36cb6800958e277b704e0a683e 100644 --- a/lib/Drupal/views/Plugin/views/area/Text.php +++ b/lib/Drupal/views/Plugin/views/area/Text.php @@ -49,13 +49,13 @@ public function buildOptionsForm(&$form, &$form_state) { // Get a list of the available fields and arguments for token replacement. $options = array(); foreach ($this->view->display_handler->getHandlers('field') as $field => $handler) { - $options[t('Fields')]["[$field]"] = $handler->ui_name(); + $options[t('Fields')]["[$field]"] = $handler->uiName(); } $count = 0; // This lets us prepare the key as we want it printed. 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())); + $options[t('Arguments')]['%' . ++$count] = t('@argument title', array('@argument' => $handler->uiName())); + $options[t('Arguments')]['!' . $count] = t('@argument input', array('@argument' => $handler->uiName())); } if (!empty($options)) { diff --git a/lib/Drupal/views/Plugin/views/area/TextCustom.php b/lib/Drupal/views/Plugin/views/area/TextCustom.php index 2bf75fe34a3ee8e6482449de439ae5d96ec2ce59..f0d410cf2385ec2c3166350769b237d9ce58c662 100644 --- a/lib/Drupal/views/Plugin/views/area/TextCustom.php +++ b/lib/Drupal/views/Plugin/views/area/TextCustom.php @@ -55,7 +55,7 @@ function render_textarea_custom($value) { if ($this->options['tokenize']) { $value = $this->view->style_plugin->tokenize_value($value, 0); } - return $this->sanitize_value($value, 'xss_admin'); + return $this->sanitizeValue($value, 'xss_admin'); } } diff --git a/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php b/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php index 9ce6fd9586b780a47aee7f08c519ee3558e7774a..218bff8b5f2dcd1c338d104dbca6b4ea94292a76 100644 --- a/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php +++ b/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php @@ -113,7 +113,7 @@ function exception_title() { * * @return TRUE/FALSE */ - function needs_style_plugin() { + public function needsStylePlugin() { $info = $this->default_actions($this->options['default_action']); $validate_info = $this->default_actions($this->options['validate']['fail']); return !empty($info['style plugin']) || !empty($validate_info['style plugin']); @@ -802,7 +802,7 @@ function default_summary() { * The alias used to get the number of records (count) for this entry. */ function summary_query() { - $this->ensure_my_table(); + $this->ensureMyTable(); // Add the field. $this->base_alias = $this->query->add_field($this->table_alias, $this->real_field); @@ -907,7 +907,7 @@ function summary_name($data) { * The argument sent may be found at $this->argument. */ public function query($group_by = FALSE) { - $this->ensure_my_table(); + $this->ensureMyTable(); $this->query->add_where(0, "$this->table_alias.$this->real_field", $this->argument); } diff --git a/lib/Drupal/views/Plugin/views/argument/Broken.php b/lib/Drupal/views/Plugin/views/argument/Broken.php index 5414188c40ad4bb91b4fb45b1c9604ff215ab28d..993bc94175e3a4c397fd247ea1245c4b00b51ed7 100644 --- a/lib/Drupal/views/Plugin/views/argument/Broken.php +++ b/lib/Drupal/views/Plugin/views/argument/Broken.php @@ -20,11 +20,11 @@ */ class Broken extends ArgumentPluginBase { - function ui_name($short = FALSE) { + public function uiName($short = FALSE) { return t('Broken/missing handler'); } - function ensure_my_table() { /* No table to ensure! */ } + public function ensureMyTable() { /* No table to ensure! */ } public function query($group_by = FALSE) { /* No query to run */ } public function buildOptionsForm(&$form, &$form_state) { $form['markup'] = array( @@ -35,6 +35,6 @@ public function buildOptionsForm(&$form, &$form_state) { /** * Determine if the handler is considered 'broken' */ - function broken() { return TRUE; } + public function broken() { return TRUE; } } diff --git a/lib/Drupal/views/Plugin/views/argument/Formula.php b/lib/Drupal/views/Plugin/views/argument/Formula.php index 50e4ffaddf682d66c668b0b6fffac52e0b909a7a..995f55103d1da99803c809a5d9fe6bc801a402a8 100644 --- a/lib/Drupal/views/Plugin/views/argument/Formula.php +++ b/lib/Drupal/views/Plugin/views/argument/Formula.php @@ -46,7 +46,7 @@ function get_formula() { * Build the summary query based on a formula */ function summary_query() { - $this->ensure_my_table(); + $this->ensureMyTable(); // Now that our table is secure, get our formula. $formula = $this->get_formula(); @@ -61,7 +61,7 @@ function summary_query() { * Build the query based upon the formula */ public function query($group_by = FALSE) { - $this->ensure_my_table(); + $this->ensureMyTable(); // Now that our table is secure, get our formula. $placeholder = $this->placeholder(); $formula = $this->get_formula() .' = ' . $placeholder; diff --git a/lib/Drupal/views/Plugin/views/argument/GroupByNumeric.php b/lib/Drupal/views/Plugin/views/argument/GroupByNumeric.php index 93044dbbffd7f53fa3ba6b3108328b4adba1ef5a..50fd70ced8e06b633586cc244ac81237904013d2 100644 --- a/lib/Drupal/views/Plugin/views/argument/GroupByNumeric.php +++ b/lib/Drupal/views/Plugin/views/argument/GroupByNumeric.php @@ -21,15 +21,15 @@ class GroupByNumeric extends ArgumentPluginBase { public function query($group_by = FALSE) { - $this->ensure_my_table(); - $field = $this->get_field(); + $this->ensureMyTable(); + $field = $this->getField(); $placeholder = $this->placeholder(); $this->query->add_having_expression(0, "$field = $placeholder", array($placeholder => $this->argument)); } - function ui_name($short = FALSE) { - return $this->get_field(parent::ui_name($short)); + public function uiName($short = FALSE) { + return $this->getField(parent::uiName($short)); } function get_sort_name() { diff --git a/lib/Drupal/views/Plugin/views/argument/ManyToOne.php b/lib/Drupal/views/Plugin/views/argument/ManyToOne.php index 13813a7f4cd7aa1b57435cecf78b94139e12d621..9ec06e22a6e3663e39068244e2e0e6dab5d5e02f 100644 --- a/lib/Drupal/views/Plugin/views/argument/ManyToOne.php +++ b/lib/Drupal/views/Plugin/views/argument/ManyToOne.php @@ -29,7 +29,7 @@ */ class ManyToOne extends ArgumentPluginBase { - function init(&$view, &$options) { + public function init(&$view, &$options) { parent::init($view, $options); $this->helper = new ManyToOneHelper($this); @@ -90,11 +90,11 @@ public function buildOptionsForm(&$form, &$form_state) { } /** - * Override ensure_my_table so we can control how this joins in. + * Override ensureMyTable so we can control how this joins in. * The operator actually has influence over joining. */ - function ensure_my_table() { - $this->helper->ensure_my_table(); + public function ensureMyTable() { + $this->helper->ensureMyTable(); } public function query($group_by = FALSE) { @@ -110,7 +110,7 @@ public function query($group_by = FALSE) { } } if ($empty) { - parent::ensure_my_table(); + parent::ensureMyTable(); $this->query->add_where(0, "$this->table_alias.$this->real_field", NULL, 'IS NULL'); return; } @@ -159,7 +159,7 @@ function title() { function summary_query() { $field = $this->table . '.' . $this->field; - $join = $this->get_join(); + $join = $this->getJoin(); if (!empty($this->options['require_value'])) { $join->type = 'INNER'; diff --git a/lib/Drupal/views/Plugin/views/argument/Numeric.php b/lib/Drupal/views/Plugin/views/argument/Numeric.php index 02c27fe5bba9125438ee9b19a4202452eecd711c..549c2472b79999ffcfc00f4bca21234ea4bb7e56 100644 --- a/lib/Drupal/views/Plugin/views/argument/Numeric.php +++ b/lib/Drupal/views/Plugin/views/argument/Numeric.php @@ -97,7 +97,7 @@ function title_query() { } public function query($group_by = FALSE) { - $this->ensure_my_table(); + $this->ensureMyTable(); if (!empty($this->options['break_phrase'])) { views_break_phrase($this->argument, $this); diff --git a/lib/Drupal/views/Plugin/views/argument/String.php b/lib/Drupal/views/Plugin/views/argument/String.php index 7e1e1267d7973bc8c0fa39be90693967f7916df3..5958e505beef4e2f167026dff41251130a8332ef 100644 --- a/lib/Drupal/views/Plugin/views/argument/String.php +++ b/lib/Drupal/views/Plugin/views/argument/String.php @@ -22,7 +22,7 @@ */ class String extends ArgumentPluginBase { - function init(&$view, &$options) { + public function init(&$view, &$options) { parent::init($view, $options); if (!empty($this->definition['many to one'])) { $this->helper = new ManyToOneHelper($this); @@ -144,7 +144,7 @@ public function buildOptionsForm(&$form, &$form_state) { */ function summary_query() { if (empty($this->definition['many to one'])) { - $this->ensure_my_table(); + $this->ensureMyTable(); } else { $this->table_alias = $this->helper->summary_join(); @@ -169,7 +169,7 @@ function summary_query() { /** * Get the formula for this argument. * - * $this->ensure_my_table() MUST have been called prior to this. + * $this->ensureMyTable() MUST have been called prior to this. */ function get_formula() { return "SUBSTRING($this->table_alias.$this->real_field, 1, " . intval($this->options['limit']) . ")"; @@ -196,12 +196,12 @@ public function query($group_by = FALSE) { if (!empty($this->options['glossary'])) { $this->helper->formula = TRUE; } - $this->helper->ensure_my_table(); + $this->helper->ensureMyTable(); $this->helper->add_filter(); return; } - $this->ensure_my_table(); + $this->ensureMyTable(); $formula = FALSE; if (empty($this->options['glossary'])) { $field = "$this->table_alias.$this->real_field"; @@ -238,7 +238,7 @@ public function query($group_by = FALSE) { } function summary_argument($data) { - $value = $this->case_transform($data->{$this->base_alias}, $this->options['path_case']); + $value = $this->caseTransform($data->{$this->base_alias}, $this->options['path_case']); if (!empty($this->options['transform_dash'])) { $value = strtr($value, ' ', '-'); } @@ -250,7 +250,7 @@ function get_sort_name() { } function title() { - $this->argument = $this->case_transform($this->argument, $this->options['case']); + $this->argument = $this->caseTransform($this->argument, $this->options['case']); if (!empty($this->options['transform_dash'])) { $this->argument = strtr($this->argument, '-', ' '); } @@ -282,7 +282,7 @@ function title_query() { } function summary_name($data) { - return $this->case_transform(parent::summary_name($data), $this->options['case']); + return $this->caseTransform(parent::summary_name($data), $this->options['case']); } } diff --git a/lib/Drupal/views/Plugin/views/argument_default/ArgumentDefaultPluginBase.php b/lib/Drupal/views/Plugin/views/argument_default/ArgumentDefaultPluginBase.php index 782bc338caaf72458a555838fe41699d459cf75f..8093727daf5fe84e4220b853ab3e74a28f77ae00 100644 --- a/lib/Drupal/views/Plugin/views/argument_default/ArgumentDefaultPluginBase.php +++ b/lib/Drupal/views/Plugin/views/argument_default/ArgumentDefaultPluginBase.php @@ -33,7 +33,7 @@ function get_argument() { } * Initialize this plugin with the view and the argument * it is linked to. */ - function init(&$view, &$argument, $options) { + public function init(&$view, &$argument, $options) { $this->view = &$view; $this->argument = &$argument; @@ -65,7 +65,7 @@ public function submitOptionsForm(&$form, &$form_state, &$options = array()) { } * Determine if the administrator has the privileges to use this * plugin */ - function access() { return TRUE; } + public function access() { return TRUE; } /** * If we don't have access to the form but are showing it anyway, ensure that diff --git a/lib/Drupal/views/Plugin/views/argument_default/Php.php b/lib/Drupal/views/Plugin/views/argument_default/Php.php index 9ff24bd17b4ce406479f8a1a162e18ff16040c4b..7dc3a561cb38b519214df186b9dbdfd171200cd2 100644 --- a/lib/Drupal/views/Plugin/views/argument_default/Php.php +++ b/lib/Drupal/views/Plugin/views/argument_default/Php.php @@ -46,7 +46,7 @@ public function buildOptionsForm(&$form, &$form_state) { * Only let users with PHP block visibility permissions set/modify this * default plugin. */ - function access() { + public function access() { return user_access('use PHP for settings'); } diff --git a/lib/Drupal/views/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php b/lib/Drupal/views/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php index d4878f9fe53a8794265e6bf29ed52fee7a4e8c49..2725e58ba3508b02fb91ddeba084eecd9517bf6b 100644 --- a/lib/Drupal/views/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php +++ b/lib/Drupal/views/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php @@ -26,7 +26,7 @@ abstract class ArgumentValidatorPluginBase extends PluginBase { * Initialize this plugin with the view and the argument * it is linked to. */ - function init(&$view, &$argument, $options) { + public function init(&$view, &$argument, $options) { $this->view = &$view; $this->argument = &$argument; @@ -57,7 +57,7 @@ public function submitOptionsForm(&$form, &$form_state, &$options = array()) { } /** * Determine if the administrator has the privileges to use this plugin */ - function access() { return TRUE; } + public function access() { return TRUE; } /** * If we don't have access to the form but are showing it anyway, ensure that diff --git a/lib/Drupal/views/Plugin/views/argument_validator/Php.php b/lib/Drupal/views/Plugin/views/argument_validator/Php.php index 82da314a727225c67296ccde02c75ac2898bca2c..798533f1d532fab1f81293a1baf6b6ea7f742831 100644 --- a/lib/Drupal/views/Plugin/views/argument_validator/Php.php +++ b/lib/Drupal/views/Plugin/views/argument_validator/Php.php @@ -45,7 +45,7 @@ public function buildOptionsForm(&$form, &$form_state) { * Only let users with PHP block visibility permissions set/modify this * validate plugin. */ - function access() { + public function access() { return user_access('use PHP for settings'); } diff --git a/lib/Drupal/views/Plugin/views/cache/CachePluginBase.php b/lib/Drupal/views/Plugin/views/cache/CachePluginBase.php index 38cdd0d1056dde1794a585448d544a2cf662e730..3c6807e284348e4734842fcce102c195e35364bf 100644 --- a/lib/Drupal/views/Plugin/views/cache/CachePluginBase.php +++ b/lib/Drupal/views/Plugin/views/cache/CachePluginBase.php @@ -59,7 +59,7 @@ abstract class CachePluginBase extends PluginBase { * @param $display * The display handler. */ - function init(&$view, &$display) { + public function init(&$view, &$display) { $this->view = &$view; $this->display = &$display; diff --git a/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php b/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php index cd33bfe116e7cfdf4549162368810066217a7ed7..bf388fcef3a1d586ab5900ea1cb7adb1a87cffaf 100644 --- a/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php +++ b/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php @@ -188,7 +188,7 @@ public function usesExposed() { if (!isset($this->has_exposed)) { foreach ($this->handlers as $type => $value) { foreach ($this->view->$type as $id => $handler) { - if ($handler->can_expose() && $handler->is_exposed()) { + if ($handler->canExpose() && $handler->isExposed()) { // one is all we need; if we find it, return true. $this->has_exposed = TRUE; return TRUE; @@ -324,7 +324,7 @@ public function acceptAttachments() { } if (!empty($this->view->argument) && $this->getOption('hide_attachment_summary')) { foreach ($this->view->argument as $argument_id => $argument) { - if ($argument->needs_style_plugin() && empty($argument->argument_validated)) { + if ($argument->needsStylePlugin() && empty($argument->argument_validated)) { return FALSE; } } @@ -943,7 +943,7 @@ public function getFieldLabels() { $relationships[$relationship] = $label; } else { - $relationships[$relationship] = $handler->ui_name(); + $relationships[$relationship] = $handler->uiName(); } } @@ -956,7 +956,7 @@ public function getFieldLabels() { $options[$id] = $label; } else { - $options[$id] = $handler->ui_name(); + $options[$id] = $handler->uiName(); } if (!empty($handler->options['relationship']) && !empty($relationships[$handler->options['relationship']])) { $options[$id] = '(' . $relationships[$handler->options['relationship']] . ') ' . $options[$id]; @@ -1717,8 +1717,8 @@ public function buildOptionsForm(&$form, &$form_state) { $options = array(); $count = 0; // This lets us prepare the key as we want it printed. 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())); + $options[t('Arguments')]['%' . ++$count] = t('@argument title', array('@argument' => $handler->uiName())); + $options[t('Arguments')]['!' . $count] = t('@argument input', array('@argument' => $handler->uiName())); } // Default text. @@ -1864,7 +1864,7 @@ public function buildOptionsForm(&$form, &$form_state) { if ($plugin->usesFields()) { foreach ($this->getHandlers('field') as $id => $handler) { - $funcs[] = $this->optionLink(t('Field @field (ID: @id)', array('@field' => $handler->ui_name(), '@id' => $id)), 'analyze-theme-field') . ': ' . $this->formatThemes($handler->themeFunctions()); + $funcs[] = $this->optionLink(t('Field @field (ID: @id)', array('@field' => $handler->uiName(), '@id' => $id)), 'analyze-theme-field') . ': ' . $this->formatThemes($handler->themeFunctions()); } } } @@ -2696,8 +2696,8 @@ public function validate() { public function isIdentifierUnique($id, $identifier) { foreach (View::viewsObjectTypes() as $type => $info) { foreach ($this->getHandlers($type) as $key => $handler) { - if ($handler->can_expose() && $handler->is_exposed()) { - if ($handler->is_a_group()) { + if ($handler->canExpose() && $handler->isExposed()) { + if ($handler->isAGroup()) { if ($id != $key && $identifier == $handler->options['group_info']['identifier']) { return FALSE; } @@ -2822,7 +2822,7 @@ public function exportHandler($indent, $prefix, $storage, $option, $definition, $handler = views_get_handler($info['table'], $info['field'], $handler_type, $override); if ($handler) { $handler->init($this->view, $info); - $output .= $indent . '/* ' . $types[$type]['stitle'] . ': ' . $handler->ui_name() . " */\n"; + $output .= $indent . '/* ' . $types[$type]['stitle'] . ': ' . $handler->uiName() . " */\n"; $output .= $handler->exportOptions($indent, $prefix . "['$option']['$id']"); } diff --git a/lib/Drupal/views/Plugin/views/exposed_form/ExposedFormPluginBase.php b/lib/Drupal/views/Plugin/views/exposed_form/ExposedFormPluginBase.php index aecbfa7e1a8409b6637b58614e7ce3fc94c7378e..34bca9bf4b13580628a433d6e44b89247bcdea66 100644 --- a/lib/Drupal/views/Plugin/views/exposed_form/ExposedFormPluginBase.php +++ b/lib/Drupal/views/Plugin/views/exposed_form/ExposedFormPluginBase.php @@ -37,7 +37,7 @@ abstract class ExposedFormPluginBase extends PluginBase { * @param $display * The display handler. */ - function init(&$view, &$display, $options = array()) { + public function init(&$view, &$display, $options = array()) { $this->view = &$view; $this->display = &$display; @@ -182,14 +182,14 @@ public function query() { if (isset($view->sort[$sort_by])) { $view->query->orderby = array(); foreach ($view->sort as $key => $sort) { - if (!$sort->is_exposed()) { + if (!$sort->isExposed()) { $sort->query(); } elseif ($key == $sort_by) { if (isset($exposed_data['sort_order']) && in_array($exposed_data['sort_order'], array('ASC', 'DESC'))) { $sort->options['order'] = $exposed_data['sort_order']; } - $sort->set_relationship(); + $sort->setRelationship(); $sort->query(); } } @@ -203,7 +203,7 @@ function post_render(&$output) { } function pre_execute() { } - function post_execute() { } + public function postExecute() { } function exposed_form_alter(&$form, &$form_state) { if (!empty($this->options['reset_button'])) { @@ -217,7 +217,7 @@ function exposed_form_alter(&$form, &$form_state) { // Check if there is exposed sorts for this view $exposed_sorts = array(); foreach ($this->view->sort as $id => $handler) { - if ($handler->can_expose() && $handler->is_exposed()) { + if ($handler->canExpose() && $handler->isExposed()) { $exposed_sorts[$id] = check_plain($handler->options['expose']['label']); } } diff --git a/lib/Drupal/views/Plugin/views/exposed_form/InputRequired.php b/lib/Drupal/views/Plugin/views/exposed_form/InputRequired.php index c73a10e52998e75cf41612cb4c7673923a8b88e7..e0a5548c95d7c2f0e522c4e0ab5bbe7bb1856d3a 100644 --- a/lib/Drupal/views/Plugin/views/exposed_form/InputRequired.php +++ b/lib/Drupal/views/Plugin/views/exposed_form/InputRequired.php @@ -56,7 +56,7 @@ function exposed_filter_applied() { $view = $this->view; if (is_array($view->filter) && count($view->filter)) { foreach ($view->filter as $filter_id => $filter) { - if ($filter->is_exposed()) { + if ($filter->isExposed()) { $identifier = $filter->options['expose']['identifier']; if (isset($view->exposed_input[$identifier])) { $cache = TRUE; diff --git a/lib/Drupal/views/Plugin/views/field/Boolean.php b/lib/Drupal/views/Plugin/views/field/Boolean.php index d14a50987ddab5e3c62a35904920b69db34c6b2c..323aac548294a180e3c58cd959164c042c063278 100644 --- a/lib/Drupal/views/Plugin/views/field/Boolean.php +++ b/lib/Drupal/views/Plugin/views/field/Boolean.php @@ -38,7 +38,7 @@ protected function defineOptions() { return $options; } - function init(&$view, &$options) { + public function init(&$view, &$options) { parent::init($view, $options); $default_formats = array( diff --git a/lib/Drupal/views/Plugin/views/field/Broken.php b/lib/Drupal/views/Plugin/views/field/Broken.php index d1064fd729f08681a04ac8f6275ff7a3222035c0..65df4676dafd86fc871024dc8f9a3d9baebf8caa 100644 --- a/lib/Drupal/views/Plugin/views/field/Broken.php +++ b/lib/Drupal/views/Plugin/views/field/Broken.php @@ -20,11 +20,11 @@ */ class Broken extends FieldPluginBase { - function ui_name($short = FALSE) { + public function uiName($short = FALSE) { return t('Broken/missing handler'); } - function ensure_my_table() { /* No table to ensure! */ } + public function ensureMyTable() { /* No table to ensure! */ } public function query($group_by = FALSE) { /* No query to run */ } public function buildOptionsForm(&$form, &$form_state) { $form['markup'] = array( @@ -35,6 +35,6 @@ public function buildOptionsForm(&$form, &$form_state) { /** * Determine if the handler is considered 'broken' */ - function broken() { return TRUE; } + public function broken() { return TRUE; } } diff --git a/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php b/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php index e0b764ff5f787fa3f250b537c9191518ad0193c3..0607535989dae9edcd2e4c326df96bdfc8a2fb6b 100644 --- a/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php +++ b/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php @@ -96,7 +96,7 @@ function allow_advanced_render() { * Called to add the field to a query. */ public function query() { - $this->ensure_my_table(); + $this->ensureMyTable(); // Add the field. $params = $this->options['group_type'] != 'group' ? array('function' => $this->options['group_type']) : array(); $this->field_alias = $this->query->add_field($this->table_alias, $this->real_field, NULL, $params); @@ -183,7 +183,7 @@ function click_sortable() { /** * Get this field's label. */ - function label() { + public function label() { if (!isset($this->options['label'])) { return ''; } @@ -851,7 +851,7 @@ public function buildOptionsForm(&$form, &$form_state) { // Get a list of the available fields and arguments for token replacement. $options = array(); foreach ($this->view->display_handler->getHandlers('field') as $field => $handler) { - $options[t('Fields')]["[$field]"] = $handler->ui_name(); + $options[t('Fields')]["[$field]"] = $handler->uiName(); // We only use fields up to (and including) this one. if ($field == $this->options['id']) { break; @@ -859,8 +859,8 @@ public function buildOptionsForm(&$form, &$form_state) { } $count = 0; // This lets us prepare the key as we want it printed. 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())); + $options[t('Arguments')]['%' . ++$count] = t('@argument title', array('@argument' => $handler->uiName())); + $options[t('Arguments')]['!' . $count] = t('@argument input', array('@argument' => $handler->uiName())); } $this->document_self_tokens($options[t('Fields')]); @@ -1080,7 +1080,7 @@ public function buildOptionsForm(&$form, &$form_state) { /** * Provide extra data to the administration form */ - function admin_summary() { + public function adminSummary() { return $this->label(); } @@ -1103,7 +1103,7 @@ function pre_render(&$values) { } */ function render($values) { $value = $this->get_value($values); - return $this->sanitize_value($value); + return $this->sanitizeValue($value); } /** @@ -1332,7 +1332,7 @@ function render_as_link($alter, $text, $tokens) { $path = strip_tags(decode_entities(strtr($path, $tokens))); if (!empty($alter['path_case']) && $alter['path_case'] != 'none') { - $path = $this->case_transform($path, $this->options['alter']['path_case']); + $path = $this->caseTransform($path, $this->options['alter']['path_case']); } if (!empty($alter['replace_spaces'])) { @@ -1625,8 +1625,8 @@ public function themeFunctions() { return $themes; } - function ui_name($short = FALSE) { - return $this->get_field(parent::ui_name($short)); + public function uiName($short = FALSE) { + return $this->getField(parent::uiName($short)); } } diff --git a/lib/Drupal/views/Plugin/views/field/Numeric.php b/lib/Drupal/views/Plugin/views/field/Numeric.php index a94028a990119bad6f52a5810e07ea9cf3163c24..fc06d72aca740b1df01388dd8d663695e73592f8 100644 --- a/lib/Drupal/views/Plugin/views/field/Numeric.php +++ b/lib/Drupal/views/Plugin/views/field/Numeric.php @@ -151,9 +151,9 @@ function render($values) { $value = format_plural($value, $this->options['format_plural_singular'], $this->options['format_plural_plural']); } - return $this->sanitize_value($this->options['prefix'], 'xss') - . $this->sanitize_value($value) - . $this->sanitize_value($this->options['suffix'], 'xss'); + return $this->sanitizeValue($this->options['prefix'], 'xss') + . $this->sanitizeValue($value) + . $this->sanitizeValue($this->options['suffix'], 'xss'); } } diff --git a/lib/Drupal/views/Plugin/views/field/PrerenderList.php b/lib/Drupal/views/Plugin/views/field/PrerenderList.php index 1a4e130f8f74c48c11c883821a0253400191648e..90b91e800d84ed0fc692f216a48945608c3b9ca8 100644 --- a/lib/Drupal/views/Plugin/views/field/PrerenderList.php +++ b/lib/Drupal/views/Plugin/views/field/PrerenderList.php @@ -78,7 +78,7 @@ public function buildOptionsForm(&$form, &$form_state) { function render_items($items) { if (!empty($items)) { if ($this->options['type'] == 'separator') { - return implode($this->sanitize_value($this->options['separator'], 'xss_admin'), $items); + return implode($this->sanitizeValue($this->options['separator'], 'xss_admin'), $items); } else { return theme('item_list', diff --git a/lib/Drupal/views/Plugin/views/field/Url.php b/lib/Drupal/views/Plugin/views/field/Url.php index a4c5f12bbc216d9708e5983baec5ff4bf1463163..8a0183d5764b51a3d0ab479ef8e631aaf1e1a295 100644 --- a/lib/Drupal/views/Plugin/views/field/Url.php +++ b/lib/Drupal/views/Plugin/views/field/Url.php @@ -43,10 +43,10 @@ public function buildOptionsForm(&$form, &$form_state) { function render($values) { $value = $this->get_value($values); if (!empty($this->options['display_as_link'])) { - return l($this->sanitize_value($value), $value, array('html' => TRUE)); + return l($this->sanitizeValue($value), $value, array('html' => TRUE)); } else { - return $this->sanitize_value($value, 'url'); + return $this->sanitizeValue($value, 'url'); } } diff --git a/lib/Drupal/views/Plugin/views/field/Xss.php b/lib/Drupal/views/Plugin/views/field/Xss.php index a4b55672c656774d5083b5213f47e15b70af2ba1..3d06bb946c47feb83ccd5e5436f5ec49b261f4fc 100644 --- a/lib/Drupal/views/Plugin/views/field/Xss.php +++ b/lib/Drupal/views/Plugin/views/field/Xss.php @@ -23,7 +23,7 @@ class Xss extends FieldPluginBase { function render($values) { $value = $this->get_value($values); - return $this->sanitize_value($value, 'xss'); + return $this->sanitizeValue($value, 'xss'); } } diff --git a/lib/Drupal/views/Plugin/views/filter/BooleanOperator.php b/lib/Drupal/views/Plugin/views/filter/BooleanOperator.php index 881e1b29e57371d0cd173a4131edca0f477003a3..a33168beeda32a20b6ea5f57aab8a84f008f55f6 100644 --- a/lib/Drupal/views/Plugin/views/filter/BooleanOperator.php +++ b/lib/Drupal/views/Plugin/views/filter/BooleanOperator.php @@ -137,8 +137,8 @@ function value_validate($form, &$form_state) { } } - function admin_summary() { - if ($this->is_a_group()) { + public function adminSummary() { + if ($this->isAGroup()) { return t('grouped'); } if (!empty($this->options['exposed'])) { @@ -154,15 +154,15 @@ function admin_summary() { return $this->value_options[!empty($this->value)]; } - function expose_options() { - parent::expose_options(); + public function defaultExposeOptions() { + parent::defaultExposeOptions(); $this->options['expose']['operator_id'] = ''; $this->options['expose']['label'] = $this->value_value; $this->options['expose']['required'] = TRUE; } public function query() { - $this->ensure_my_table(); + $this->ensureMyTable(); $field = "$this->table_alias.$this->real_field"; if (empty($this->value)) { diff --git a/lib/Drupal/views/Plugin/views/filter/BooleanOperatorString.php b/lib/Drupal/views/Plugin/views/filter/BooleanOperatorString.php index e0300d9c19513deccf27cd64a4c75272ad4eea6a..e47122dc43dbefa057f2a05fd78aff4655b9ffc0 100644 --- a/lib/Drupal/views/Plugin/views/filter/BooleanOperatorString.php +++ b/lib/Drupal/views/Plugin/views/filter/BooleanOperatorString.php @@ -27,7 +27,7 @@ class BooleanOperatorString extends BooleanOperator { public function query() { - $this->ensure_my_table(); + $this->ensureMyTable(); $where = "$this->table_alias.$this->real_field "; if (empty($this->value)) { diff --git a/lib/Drupal/views/Plugin/views/filter/Broken.php b/lib/Drupal/views/Plugin/views/filter/Broken.php index 6eda1ec246e9e4e20dedd7ae01544f0a7a9fc668..cf2445ec84d273db0f6d2fb3c453c6aca824f38f 100644 --- a/lib/Drupal/views/Plugin/views/filter/Broken.php +++ b/lib/Drupal/views/Plugin/views/filter/Broken.php @@ -20,11 +20,11 @@ */ class Broken extends FilterPluginBase { - function ui_name($short = FALSE) { + public function uiName($short = FALSE) { return t('Broken/missing handler'); } - function ensure_my_table() { /* No table to ensure! */ } + public function ensureMyTable() { /* No table to ensure! */ } public function query($group_by = FALSE) { /* No query to run */ } public function buildOptionsForm(&$form, &$form_state) { $form['markup'] = array( @@ -35,6 +35,6 @@ public function buildOptionsForm(&$form, &$form_state) { /** * Determine if the handler is considered 'broken' */ - function broken() { return TRUE; } + public function broken() { return TRUE; } } diff --git a/lib/Drupal/views/Plugin/views/filter/Combine.php b/lib/Drupal/views/Plugin/views/filter/Combine.php index e21f884cfaf5bca9b9993d8f7231738f998cf78d..dd6621455ecba283b1846a069dc83132cc6b8fb7 100644 --- a/lib/Drupal/views/Plugin/views/filter/Combine.php +++ b/lib/Drupal/views/Plugin/views/filter/Combine.php @@ -40,7 +40,7 @@ public function buildOptionsForm(&$form, &$form_state) { if ($this->view->style_plugin->usesFields()) { $options = array(); foreach ($this->view->display_handler->getHandlers('field') as $name => $field) { - $options[$name] = $field->ui_name(TRUE); + $options[$name] = $field->uiName(TRUE); } if ($options) { $form['fields'] = array( @@ -65,7 +65,7 @@ public function query() { foreach ($this->options['fields'] as $id) { $field = $this->view->field[$id]; // Always add the table of the selected fields to be sure a table alias exists. - $field->ensure_my_table(); + $field->ensureMyTable(); if (!empty($field->field_alias) && !empty($field->field_alias)) { $fields[] = "$field->table_alias.$field->real_field"; } diff --git a/lib/Drupal/views/Plugin/views/filter/Date.php b/lib/Drupal/views/Plugin/views/filter/Date.php index bbc4f2ec6e6287ec101190dcb406624af2c2f9c8..d8f4c2956d909fe3c007334de1f69ff13a0fa263 100644 --- a/lib/Drupal/views/Plugin/views/filter/Date.php +++ b/lib/Drupal/views/Plugin/views/filter/Date.php @@ -58,7 +58,7 @@ public function validateOptionsForm(&$form, &$form_state) { $this->validateValidTime($form['value'], $form_state['values']['options']['operator'], $form_state['values']['options']['value']); } - function exposed_validate(&$form, &$form_state) { + public function validateExposed(&$form, &$form_state) { if (empty($this->options['exposed'])) { return; } @@ -132,14 +132,14 @@ function build_group_validate($form, &$form_state) { } - function accept_exposed_input($input) { + public function acceptExposedInput($input) { if (empty($this->options['exposed'])) { return TRUE; } // Store this because it will get overwritten. $type = $this->value['type']; - $rc = parent::accept_exposed_input($input); + $rc = parent::acceptExposedInput($input); // Don't filter if value(s) are empty. $operators = $this->operators(); diff --git a/lib/Drupal/views/Plugin/views/filter/FilterPluginBase.php b/lib/Drupal/views/Plugin/views/filter/FilterPluginBase.php index be96c7df3071d1851d14cea938215d814f0594fc..d6b6a24342293ce385bcb8a9ac53032b44a495a8 100644 --- a/lib/Drupal/views/Plugin/views/filter/FilterPluginBase.php +++ b/lib/Drupal/views/Plugin/views/filter/FilterPluginBase.php @@ -78,7 +78,7 @@ abstract class FilterPluginBase extends HandlerBase { * This likely has to be overridden by filters which are more complex * than simple operator/value. */ - function init(&$view, &$options) { + public function init(&$view, &$options) { parent::init($view, $options); $this->operator = $this->options['operator']; @@ -90,7 +90,7 @@ function init(&$view, &$options) { $this->options['expose']['operator_id'] = $options['expose']['operator']; } - if ($this->multiple_exposed_input()) { + if ($this->multipleExposedInput()) { $this->group_info = array_filter($options['group_info']['default_group_multiple']); $this->options['expose']['multiple'] = TRUE; } @@ -158,28 +158,28 @@ protected function defineOptions() { /** * Display the filter on the administrative summary */ - function admin_summary() { + public function adminSummary() { return check_plain((string) $this->operator) . ' ' . check_plain((string) $this->value); } /** * Determine if a filter can be exposed. */ - function can_expose() { return TRUE; } + public function canExpose() { return TRUE; } /** * Determine if a filter can be converted into a group. * Only exposed filters with operators available can be converted into groups. */ function can_build_group() { - return $this->is_exposed() && (count($this->operator_options()) > 0); + return $this->isExposed() && (count($this->operator_options()) > 0); } /** * Returns TRUE if the exposed filter works like a grouped filter. */ - function is_a_group() { - return $this->is_exposed() && !empty($this->options['is_grouped']); + public function isAGroup() { + return $this->isExposed() && !empty($this->options['is_grouped']); } /** @@ -190,8 +190,8 @@ function is_a_group() { */ public function buildOptionsForm(&$form, &$form_state) { parent::buildOptionsForm($form, $form_state); - if ($this->can_expose()) { - $this->show_expose_button($form, $form_state); + if ($this->canExpose()) { + $this->showExposeButton($form, $form_state); } if ($this->can_build_group()) { $this->show_build_group_button($form, $form_state); @@ -199,7 +199,7 @@ public function buildOptionsForm(&$form, &$form_state) { $form['clear_markup_start'] = array( '#markup' => '<div class="clearfix">', ); - if ($this->is_a_group()) { + if ($this->isAGroup()) { if ($this->can_build_group()) { $form['clear_markup_start'] = array( '#markup' => '<div class="clearfix">', @@ -219,9 +219,9 @@ public function buildOptionsForm(&$form, &$form_state) { $form['clear_markup_end'] = array( '#markup' => '</div>', ); - if ($this->can_expose()) { - // Add the subform from expose_form(). - $this->show_expose_form($form, $form_state); + if ($this->canExpose()) { + // Add the subform from buildExposeForm(). + $this->showExposeForm($form, $form_state); } } } @@ -232,10 +232,10 @@ public function buildOptionsForm(&$form, &$form_state) { public function validateOptionsForm(&$form, &$form_state) { $this->operator_validate($form, $form_state); $this->value_validate($form, $form_state); - if (!empty($this->options['exposed']) && !$this->is_a_group()) { - $this->expose_validate($form, $form_state); + if (!empty($this->options['exposed']) && !$this->isAGroup()) { + $this->validateExposeForm($form, $form_state); } - if ($this->is_a_group()) { + if ($this->isAGroup()) { $this->build_group_validate($form, $form_state); } } @@ -246,14 +246,14 @@ public function validateOptionsForm(&$form, &$form_state) { public function submitOptionsForm(&$form, &$form_state) { unset($form_state['values']['expose_button']); // don't store this. unset($form_state['values']['group_button']); // don't store this. - if (!$this->is_a_group()) { + if (!$this->isAGroup()) { $this->operator_submit($form, $form_state); $this->value_submit($form, $form_state); } if (!empty($this->options['exposed'])) { - $this->expose_submit($form, $form_state); + $this->submitExposeForm($form, $form_state); } - if ($this->is_a_group()) { + if ($this->isAGroup()) { $this->build_group_submit($form, $form_state); } } @@ -411,7 +411,7 @@ function show_build_group_button(&$form, &$form_state) { /** * Shortcut to display the expose/hide button. */ - function show_expose_button(&$form, &$form_state) { + public function showExposeButton(&$form, &$form_state) { $form['expose_button'] = array( '#prefix' => '<div class="views-expose clearfix">', '#suffix' => '</div>', @@ -462,7 +462,7 @@ function show_expose_button(&$form, &$form_state) { * * @see buildOptionsForm() */ - function expose_form(&$form, &$form_state) { + public function buildExposeForm(&$form, &$form_state) { $form['#theme'] = 'views_ui_expose_filter_form'; // #flatten will move everything from $form['expose'][$key] to $form[$key] // prior to rendering. That's why the pre_render for it needs to run first, @@ -574,7 +574,7 @@ function expose_form(&$form, &$form_state) { /** * Validate the options form. */ - function expose_validate($form, &$form_state) { + public function validateExposeForm($form, &$form_state) { if (empty($form_state['values']['options']['expose']['identifier'])) { form_error($form['expose']['identifier'], t('The identifier is required if the filter is exposed.')); } @@ -668,7 +668,7 @@ function build_group_submit($form, &$form_state) { /** * Provide default options for exposed filters. */ - function expose_options() { + public function defaultExposeOptions() { $this->options['expose'] = array( 'use_operator' => FALSE, 'operator' => $this->options['id'] . '_op', @@ -704,7 +704,7 @@ function build_group_options() { * single filter. */ function group_form(&$form, &$form_state) { - if (!empty($this->options['group_info']['optional']) && !$this->multiple_exposed_input()) { + if (!empty($this->options['group_info']['optional']) && !$this->multipleExposedInput()) { $old_any = $this->options['group_info']['widget'] == 'select' ? '<Any>' : '<Any>'; $any_label = variable_get('views_exposed_filter_any_label', 'new_any') == 'old_any' ? $old_any : t('- Any -'); @@ -749,7 +749,7 @@ function group_form(&$form, &$form_state) { * * You can override this if it doesn't do what you expect. */ - function exposed_form(&$form, &$form_state) { + public function buildExposedForm(&$form, &$form_state) { if (empty($this->options['exposed'])) { return; } @@ -1134,12 +1134,12 @@ function prepare_filter_select_options(&$options) { * - value: The $form key of the value. Set to NULL if no value. * - label: The label to use for this piece. */ - function exposed_info() { + public function exposedInfo() { if (empty($this->options['exposed'])) { return; } - if ($this->is_a_group()) { + if ($this->isAGroup()) { return array( 'value' => $this->options['group_info']['identifier'], 'label' => $this->options['group_info']['label'], @@ -1167,7 +1167,7 @@ function exposed_info() { * choosed in the checkboxes. */ function convert_exposed_input(&$input, $selected_group_id = NULL) { - if ($this->is_a_group()) { + if ($this->isAGroup()) { // If it is already defined the selected group, use it. Only valid // when the filter uses checkboxes for widget. if (!empty($selected_group_id)) { @@ -1207,7 +1207,7 @@ function convert_exposed_input(&$input, $selected_group_id = NULL) { */ function group_multiple_exposed_input(&$input) { if (!empty($input[$this->options['group_info']['identifier']])) { - return array_filter($input[$this->options['group_info']['identifier']]); + return array_filter($input[$this->options['group_info']['identifier']]); } return array(); } @@ -1216,17 +1216,17 @@ function group_multiple_exposed_input(&$input) { * Returns TRUE if users can select multiple groups items of a * grouped exposed filter. */ - function multiple_exposed_input() { - return $this->is_a_group() && !empty($this->options['group_info']['multiple']); + public function multipleExposedInput() { + return $this->isAGroup() && !empty($this->options['group_info']['multiple']); } /** * If set to remember exposed input in the session, store it there. - * This function is similar to store_exposed_input but modified to + * This function is similar to storeExposedInput but modified to * work properly when the filter is a group. */ function store_group_input($input, $status) { - if (!$this->is_a_group() || empty($this->options['group_info']['identifier'])) { + if (!$this->isAGroup() || empty($this->options['group_info']['identifier'])) { return TRUE; } @@ -1263,7 +1263,7 @@ function store_group_input($input, $status) { * Check to see if input from the exposed filters should change * the behavior of this filter. */ - function accept_exposed_input($input) { + public function acceptExposedInput($input) { if (empty($this->options['exposed'])) { return TRUE; } @@ -1308,7 +1308,7 @@ function accept_exposed_input($input) { return TRUE; } - function store_exposed_input($input, $status) { + public function storeExposedInput($input, $status) { if (empty($this->options['exposed']) || empty($this->options['expose']['identifier'])) { return TRUE; } @@ -1368,7 +1368,7 @@ function store_exposed_input($input, $status) { * and $this->value respectively. */ public function query() { - $this->ensure_my_table(); + $this->ensureMyTable(); $this->query->add_where($this->options['group'], "$this->table_alias.$this->real_field", $this->value, $this->operator); } diff --git a/lib/Drupal/views/Plugin/views/filter/GroupByNumeric.php b/lib/Drupal/views/Plugin/views/filter/GroupByNumeric.php index d80e414f6863503cb8a670e297cf8de228392600..09cf45926c63ca21315a38b624c35b69ebfa4d2d 100644 --- a/lib/Drupal/views/Plugin/views/filter/GroupByNumeric.php +++ b/lib/Drupal/views/Plugin/views/filter/GroupByNumeric.php @@ -21,8 +21,8 @@ class GroupByNumeric extends Numeric { public function query() { - $this->ensure_my_table(); - $field = $this->get_field(); + $this->ensureMyTable(); + $field = $this->getField(); $info = $this->operators(); if (!empty($info[$this->operator]['method'])) { @@ -57,8 +57,8 @@ function op_empty($field) { $this->query->add_having_expression($this->options['group'], "$field $operator"); } - function ui_name($short = FALSE) { - return $this->get_field(parent::ui_name($short)); + public function uiName($short = FALSE) { + return $this->getField(parent::uiName($short)); } function can_group() { return FALSE; } diff --git a/lib/Drupal/views/Plugin/views/filter/InOperator.php b/lib/Drupal/views/Plugin/views/filter/InOperator.php index 2c33ca2536bc7e71d5015ac1bedd8ed04da97ee4..d8778d3ad138b23469006f4477bd2d0e063e6f04 100644 --- a/lib/Drupal/views/Plugin/views/filter/InOperator.php +++ b/lib/Drupal/views/Plugin/views/filter/InOperator.php @@ -69,13 +69,13 @@ function get_value_options() { return $this->value_options; } - function expose_options() { - parent::expose_options(); + public function defaultExposeOptions() { + parent::defaultExposeOptions(); $this->options['expose']['reduce'] = FALSE; } - function expose_form(&$form, &$form_state) { - parent::expose_form($form, $form_state); + public function buildExposeForm(&$form, &$form_state) { + parent::buildExposeForm($form, $form_state); $form['expose']['reduce'] = array( '#type' => 'checkbox', '#title' => t('Limit list to selected items'), @@ -271,7 +271,7 @@ function reduce_value_options($input = NULL) { return $options; } - function accept_exposed_input($input) { + public function acceptExposedInput($input) { // A very special override because the All state for this type of // filter could have a default: if (empty($this->options['exposed'])) { @@ -287,7 +287,7 @@ function accept_exposed_input($input) { } } - return parent::accept_exposed_input($input); + return parent::acceptExposedInput($input); } function value_submit($form, &$form_state) { @@ -303,8 +303,8 @@ function value_submit($form, &$form_state) { $form_state['values']['options']['value'] = $form['value']['#value']; } - function admin_summary() { - if ($this->is_a_group()) { + public function adminSummary() { + if ($this->isAGroup()) { return t('grouped'); } if (!empty($this->options['exposed'])) { @@ -376,7 +376,7 @@ function op_simple() { if (empty($this->value)) { return; } - $this->ensure_my_table(); + $this->ensureMyTable(); // We use array_values() because the checkboxes keep keys and that can cause // array addition problems. @@ -384,7 +384,7 @@ function op_simple() { } function op_empty() { - $this->ensure_my_table(); + $this->ensureMyTable(); if ($this->operator == 'empty') { $operator = "IS NULL"; } @@ -406,7 +406,7 @@ public function validate() { } if (!in_array($this->operator, $this->operator_values(1))) { - $errors[] = t('The operator is invalid on filter: @filter.', array('@filter' => $this->ui_name(TRUE))); + $errors[] = t('The operator is invalid on filter: @filter.', array('@filter' => $this->uiName(TRUE))); } if (is_array($this->value)) { if (!isset($this->value_options)) { @@ -429,11 +429,11 @@ public function validate() { } // Choose different kind of ouput for 0, a single and multiple values. if (count($this->value) == 0) { - $errors[] = t('No valid values found on filter: @filter.', array('@filter' => $this->ui_name(TRUE))); + $errors[] = t('No valid values found on filter: @filter.', array('@filter' => $this->uiName(TRUE))); } } elseif (!empty($this->value) && ($this->operator == 'in' || $this->operator == 'not in')) { - $errors[] = t('The value @value is not an array for @operator on filter: @filter', array('@value' => views_var_export($this->value), '@operator' => $this->operator, '@filter' => $this->ui_name(TRUE))); + $errors[] = t('The value @value is not an array for @operator on filter: @filter', array('@value' => views_var_export($this->value), '@operator' => $this->operator, '@filter' => $this->uiName(TRUE))); } return $errors; } diff --git a/lib/Drupal/views/Plugin/views/filter/ManyToOne.php b/lib/Drupal/views/Plugin/views/filter/ManyToOne.php index 7000291c73e3bf0a76b5e1797766be8f2a99da3c..4e2e3bf82ea4787f4190ce4e45e6c848699429d2 100644 --- a/lib/Drupal/views/Plugin/views/filter/ManyToOne.php +++ b/lib/Drupal/views/Plugin/views/filter/ManyToOne.php @@ -15,7 +15,7 @@ * such as terms (many terms per node) or roles (many roles per user). * * The construct method needs to be overridden to provide a list of options; - * alternately, the value_form and admin_summary methods need to be overriden + * alternately, the value_form and adminSummary methods need to be overriden * to provide something that isn't just a select list. * * @ingroup views_filter_handlers @@ -33,7 +33,7 @@ class ManyToOne extends InOperator { */ var $helper = NULL; - function init(&$view, &$options) { + public function init(&$view, &$options) { parent::init($view, $options); $this->helper = new ManyToOneHelper($this); } @@ -113,17 +113,17 @@ function value_form(&$form, &$form_state) { } /** - * Override ensure_my_table so we can control how this joins in. + * Override ensureMyTable so we can control how this joins in. * The operator actually has influence over joining. */ - function ensure_my_table() { + public function ensureMyTable() { // Defer to helper if the operator specifies it. $info = $this->operators(); if (isset($info[$this->operator]['ensure_my_table']) && $info[$this->operator]['ensure_my_table'] == 'helper') { - return $this->helper->ensure_my_table(); + return $this->helper->ensureMyTable(); } - return parent::ensure_my_table(); + return parent::ensureMyTable(); } function op_helper() { diff --git a/lib/Drupal/views/Plugin/views/filter/Numeric.php b/lib/Drupal/views/Plugin/views/filter/Numeric.php index a6ed129d0fe39b10cb1519916e750ae9db98e9bf..15ac2a135df01b2f4c8722acbf5f9806e7536d97 100644 --- a/lib/Drupal/views/Plugin/views/filter/Numeric.php +++ b/lib/Drupal/views/Plugin/views/filter/Numeric.php @@ -244,7 +244,7 @@ function value_form(&$form, &$form_state) { } public function query() { - $this->ensure_my_table(); + $this->ensureMyTable(); $field = "$this->table_alias.$this->real_field"; $info = $this->operators(); @@ -281,8 +281,8 @@ function op_regex($field) { $this->query->add_where($this->options['group'], $field, $this->value, 'RLIKE'); } - function admin_summary() { - if ($this->is_a_group()) { + public function adminSummary() { + if ($this->isAGroup()) { return t('grouped'); } if (!empty($this->options['exposed'])) { @@ -303,7 +303,7 @@ function admin_summary() { /** * Do some minor translation of the exposed input */ - function accept_exposed_input($input) { + public function acceptExposedInput($input) { if (empty($this->options['exposed'])) { return TRUE; } @@ -319,7 +319,7 @@ function accept_exposed_input($input) { } } - $rc = parent::accept_exposed_input($input); + $rc = parent::acceptExposedInput($input); if (empty($this->options['expose']['required'])) { // We have to do some of our own checking for non-required filters. diff --git a/lib/Drupal/views/Plugin/views/filter/String.php b/lib/Drupal/views/Plugin/views/filter/String.php index b13d1748241be17f9ce446cd44e6b9591afd990d..eef2018ccda6a3e10834aef5d8290ac3468294fa 100644 --- a/lib/Drupal/views/Plugin/views/filter/String.php +++ b/lib/Drupal/views/Plugin/views/filter/String.php @@ -157,8 +157,8 @@ function operator_options($which = 'title') { return $options; } - function admin_summary() { - if ($this->is_a_group()) { + public function adminSummary() { + if ($this->isAGroup()) { return t('grouped'); } if (!empty($this->options['exposed'])) { @@ -253,7 +253,7 @@ function operator() { * and $this->value respectively. */ public function query() { - $this->ensure_my_table(); + $this->ensureMyTable(); $field = "$this->table_alias.$this->real_field"; $info = $this->operators(); diff --git a/lib/Drupal/views/Plugin/views/localization/LocalizationPluginBase.php b/lib/Drupal/views/Plugin/views/localization/LocalizationPluginBase.php index bc01e5ad62188ab7d549f0c31c80f730c584b326..3c8bee6e1eb0a6a2450b338df6bec7c89cd0a8e7 100644 --- a/lib/Drupal/views/Plugin/views/localization/LocalizationPluginBase.php +++ b/lib/Drupal/views/Plugin/views/localization/LocalizationPluginBase.php @@ -33,7 +33,7 @@ abstract class LocalizationPluginBase extends PluginBase { * @param $view * The view object. */ - function init(&$view) { + public function init(&$view) { $this->view = &$view; } diff --git a/lib/Drupal/views/Plugin/views/pager/None.php b/lib/Drupal/views/Plugin/views/pager/None.php index 06ddac843970b77f2d3b43399d085322d24c70df..434f0c16ad3b390f0a061d67dc020a7b090ae7c4 100644 --- a/lib/Drupal/views/Plugin/views/pager/None.php +++ b/lib/Drupal/views/Plugin/views/pager/None.php @@ -24,7 +24,7 @@ */ class None extends PagerPluginBase { - function init(&$view, &$display, $options = array()) { + public function init(&$view, &$display, $options = array()) { parent::init($view, $display, $options); // If the pager is set to none, then it should show all items. @@ -74,7 +74,7 @@ function execute_count_query(&$count_query) { // If we are displaying all items, never count. But we can update the count in post_execute. } - function post_execute(&$result) { + public function postExecute(&$result) { $this->total_items = count($result); } diff --git a/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php b/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php index a6f68c5166036708c726fe1fa86e83f31444867e..4966336bf94f306ae52aeae53a674be0f1f310f1 100644 --- a/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php +++ b/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php @@ -39,7 +39,7 @@ abstract class PagerPluginBase extends PluginBase { * @param $display * The display handler. */ - function init(&$view, &$display, $options = array()) { + public function init(&$view, &$display, $options = array()) { $this->view = &$view; $this->display = &$display; @@ -194,7 +194,7 @@ function pre_execute(&$query) { } /** * Perform any needed actions just after the query executing. */ - function post_execute(&$result) { } + public function postExecute(&$result) { } /** * Perform any needed actions just before rendering. diff --git a/lib/Drupal/views/Plugin/views/query/QueryPluginBase.php b/lib/Drupal/views/Plugin/views/query/QueryPluginBase.php index 62520f0e163cf1839402f3bfa1bda31534ca411f..0f5fc9b23c3b108a63343e59f754df719fc91d63 100644 --- a/lib/Drupal/views/Plugin/views/query/QueryPluginBase.php +++ b/lib/Drupal/views/Plugin/views/query/QueryPluginBase.php @@ -24,7 +24,7 @@ abstract class QueryPluginBase extends PluginBase implements QueryInterface { /** * Constructor; Create the basic query object and fill with default values. */ - function init($base_table, $base_field, $options) { + public function init($base_table, $base_field, $options) { $this->base_table = $base_table; $this->base_field = $base_field; $this->unpackOptions($this->options, $options); diff --git a/lib/Drupal/views/Plugin/views/query/Sql.php b/lib/Drupal/views/Plugin/views/query/Sql.php index c1434efbd7ca8dfb7f3d8560a7c640ec1840086c..947a8c9afd8547126576d1e53a60825056fcdfd8 100644 --- a/lib/Drupal/views/Plugin/views/query/Sql.php +++ b/lib/Drupal/views/Plugin/views/query/Sql.php @@ -113,7 +113,7 @@ class Sql extends QueryPluginBase { /** * Constructor; Create the basic query object and fill with default values. */ - function init($base_table = 'node', $base_field = 'nid', $options) { + public function init($base_table = 'node', $base_field = 'nid', $options) { parent::init($base_table, $base_field, $options); $this->base_table = $base_table; // Predefine these above, for clarity. $this->base_field = $base_field; @@ -1502,7 +1502,7 @@ function execute(&$view) { $view->result[] = $item; } - $view->pager->post_execute($view->result); + $view->pager->postExecute($view->result); if ($view->pager->use_count_query() || !empty($view->get_total_rows)) { $view->total_rows = $view->pager->get_total_items(); } diff --git a/lib/Drupal/views/Plugin/views/relationship/Broken.php b/lib/Drupal/views/Plugin/views/relationship/Broken.php index 4bf31dd89dce315526f730ba9c80018d0e7d526f..e829449db327bcfa77debb2d19fd4541bf7fe4dd 100644 --- a/lib/Drupal/views/Plugin/views/relationship/Broken.php +++ b/lib/Drupal/views/Plugin/views/relationship/Broken.php @@ -20,11 +20,11 @@ */ class Broken extends RelationshipPluginBase { - function ui_name($short = FALSE) { + public function uiName($short = FALSE) { return t('Broken/missing handler'); } - function ensure_my_table() { /* No table to ensure! */ } + public function ensureMyTable() { /* No table to ensure! */ } public function query() { /* No query to run */ } public function buildOptionsForm(&$form, &$form_state) { $form['markup'] = array( @@ -35,6 +35,6 @@ public function buildOptionsForm(&$form, &$form_state) { /** * Determine if the handler is considered 'broken' */ - function broken() { return TRUE; } + public function broken() { return TRUE; } } diff --git a/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php b/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php index 4712dd15cad18920b13442a32f2b86bd1ba04119..26e2a06439f92f6eaf8075e2f359c41441cb8e08 100644 --- a/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php +++ b/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php @@ -343,7 +343,7 @@ public function query() { $table_data = views_fetch_data($this->definition['base']); $base_field = empty($this->definition['base field']) ? $table_data['table']['base']['field'] : $this->definition['base field']; - $this->ensure_my_table(); + $this->ensureMyTable(); $def = $this->definition; $def['table'] = $this->definition['base']; diff --git a/lib/Drupal/views/Plugin/views/relationship/RelationshipPluginBase.php b/lib/Drupal/views/Plugin/views/relationship/RelationshipPluginBase.php index 603859db18ac9c1217234c9883ed2d7612209775..66d55b355760c89d3464fa30391890937bd35ba4 100644 --- a/lib/Drupal/views/Plugin/views/relationship/RelationshipPluginBase.php +++ b/lib/Drupal/views/Plugin/views/relationship/RelationshipPluginBase.php @@ -47,7 +47,7 @@ abstract class RelationshipPluginBase extends HandlerBase { * Init handler to let relationships live on tables other than * the table they operate on. */ - function init(&$view, &$options) { + public function init(&$view, &$options) { parent::init($view, $options); if (isset($this->definition['relationship table'])) { $this->table = $this->definition['relationship table']; @@ -69,6 +69,7 @@ function label() { return $this->options['label']; } + protected function defineOptions() { $options = parent::defineOptions(); @@ -117,7 +118,7 @@ public function query() { $table_data = views_fetch_data($this->definition['base']); $base_field = empty($this->definition['base field']) ? $table_data['table']['base']['field'] : $this->definition['base field']; - $this->ensure_my_table(); + $this->ensureMyTable(); $def = $this->definition; $def['table'] = $this->definition['base']; @@ -160,7 +161,7 @@ public function query() { /** * You can't groupby a relationship. */ - function use_group_by() { + public function usesGroupBy() { return FALSE; } diff --git a/lib/Drupal/views/Plugin/views/row/RowPluginBase.php b/lib/Drupal/views/Plugin/views/row/RowPluginBase.php index 4c23ca01bd376d2816b94751e39e465049e6c378..f84f6ad94802d04f1b53c620db98a77d20fa04a8 100644 --- a/lib/Drupal/views/Plugin/views/row/RowPluginBase.php +++ b/lib/Drupal/views/Plugin/views/row/RowPluginBase.php @@ -41,7 +41,7 @@ abstract class RowPluginBase extends PluginBase { /** * Initialize the row plugin. */ - function init(&$view, &$display, $options = NULL) { + public function init(&$view, &$display, $options = NULL) { $this->view = &$view; $this->display = &$display; diff --git a/lib/Drupal/views/Plugin/views/sort/Broken.php b/lib/Drupal/views/Plugin/views/sort/Broken.php index db1faaf96650882341fedd60ec0d980e45f1f397..c2f8b6842a55c1a813268288626764025d82d33a 100644 --- a/lib/Drupal/views/Plugin/views/sort/Broken.php +++ b/lib/Drupal/views/Plugin/views/sort/Broken.php @@ -20,11 +20,11 @@ */ class Broken extends SortPluginBase { - function ui_name($short = FALSE) { + public function uiName($short = FALSE) { return t('Broken/missing handler'); } - function ensure_my_table() { /* No table to ensure! */ } + public function ensureMyTable() { /* No table to ensure! */ } public function query($group_by = FALSE) { /* No query to run */ } public function buildOptionsForm(&$form, &$form_state) { $form['markup'] = array( @@ -35,6 +35,6 @@ public function buildOptionsForm(&$form, &$form_state) { /** * Determine if the handler is considered 'broken' */ - function broken() { return TRUE; } + public function broken() { return TRUE; } } diff --git a/lib/Drupal/views/Plugin/views/sort/Date.php b/lib/Drupal/views/Plugin/views/sort/Date.php index 7714005b979013c5ad14e48b3c2397a79623db61..da5f8d382d83cdcbab7411c30d0284d3f562adeb 100644 --- a/lib/Drupal/views/Plugin/views/sort/Date.php +++ b/lib/Drupal/views/Plugin/views/sort/Date.php @@ -52,7 +52,7 @@ public function buildOptionsForm(&$form, &$form_state) { * Called to add the sort to a query. */ public function query() { - $this->ensure_my_table(); + $this->ensureMyTable(); switch ($this->options['granularity']) { case 'second': default: diff --git a/lib/Drupal/views/Plugin/views/sort/GroupByNumeric.php b/lib/Drupal/views/Plugin/views/sort/GroupByNumeric.php index f434a4e00bec5b910da24b0a37fae57419747ee1..524b1a56d9cb94aaced27f4cea2341d91ad6ff90 100644 --- a/lib/Drupal/views/Plugin/views/sort/GroupByNumeric.php +++ b/lib/Drupal/views/Plugin/views/sort/GroupByNumeric.php @@ -18,7 +18,7 @@ */ class GroupByNumeric extends SortPluginBase { - function init(&$view, &$options) { + public function init(&$view, &$options) { parent::init($view, $options); // Initialize the original handler. @@ -30,7 +30,7 @@ function init(&$view, &$options) { * Called to add the field to a query. */ public function query() { - $this->ensure_my_table(); + $this->ensureMyTable(); $params = array( 'function' => $this->options['group_type'], @@ -39,8 +39,8 @@ public function query() { $this->query->add_orderby($this->table_alias, $this->real_field, $this->options['order'], NULL, $params); } - function ui_name($short = FALSE) { - return $this->get_field(parent::ui_name($short)); + public function uiName($short = FALSE) { + return $this->getField(parent::uiName($short)); } } diff --git a/lib/Drupal/views/Plugin/views/sort/MenuHierarchy.php b/lib/Drupal/views/Plugin/views/sort/MenuHierarchy.php index 5be992a54582f63c287ddd4284dcb075ddc53012..71d4de017403e3fdf5cc1fac89a50d7cc0894060 100644 --- a/lib/Drupal/views/Plugin/views/sort/MenuHierarchy.php +++ b/lib/Drupal/views/Plugin/views/sort/MenuHierarchy.php @@ -42,7 +42,7 @@ public function buildOptionsForm(&$form, &$form_state) { } public function query() { - $this->ensure_my_table(); + $this->ensureMyTable(); $max_depth = isset($this->definition['max depth']) ? $this->definition['max depth'] : MENU_MAX_DEPTH; for ($i = 1; $i <= $max_depth; ++$i) { if ($this->options['sort_within_level']) { diff --git a/lib/Drupal/views/Plugin/views/sort/SortPluginBase.php b/lib/Drupal/views/Plugin/views/sort/SortPluginBase.php index 3b355bdaa702e6840e56f6be0cdbd61c1a578a71..ef862ea28640c384ba6601b43d9139a626d4cf70 100644 --- a/lib/Drupal/views/Plugin/views/sort/SortPluginBase.php +++ b/lib/Drupal/views/Plugin/views/sort/SortPluginBase.php @@ -26,13 +26,13 @@ abstract class SortPluginBase extends HandlerBase { /** * Determine if a sort can be exposed. */ - function can_expose() { return TRUE; } + public function canExpose() { return TRUE; } /** * Called to add the sort to a query. */ public function query() { - $this->ensure_my_table(); + $this->ensureMyTable(); // Add the field. $this->query->add_orderby($this->table_alias, $this->real_field, $this->options['order']); } @@ -53,7 +53,7 @@ protected function defineOptions() { /** * Display whether or not the sort order is ascending or descending */ - function admin_summary() { + public function adminSummary() { if (!empty($this->options['exposed'])) { return t('Exposed'); } @@ -75,21 +75,21 @@ function admin_summary() { */ public function buildOptionsForm(&$form, &$form_state) { parent::buildOptionsForm($form, $form_state); - if ($this->can_expose()) { - $this->show_expose_button($form, $form_state); + if ($this->canExpose()) { + $this->showExposeButton($form, $form_state); } $form['op_val_start'] = array('#value' => '<div class="clearfix">'); $this->show_sort_form($form, $form_state); $form['op_val_end'] = array('#value' => '</div>'); - if ($this->can_expose()) { - $this->show_expose_form($form, $form_state); + if ($this->canExpose()) { + $this->showExposeForm($form, $form_state); } } /** * Shortcut to display the expose/hide button. */ - function show_expose_button(&$form, &$form_state) { + public function showExposeButton(&$form, &$form_state) { $form['expose_button'] = array( '#prefix' => '<div class="views-expose clearfix">', '#suffix' => '</div>', @@ -141,7 +141,7 @@ function show_expose_button(&$form, &$form_state) { public function validateOptionsForm(&$form, &$form_state) { $this->sort_validate($form, $form_state); if (!empty($this->options['exposed'])) { - $this->expose_validate($form, $form_state); + $this->validateExposeForm($form, $form_state); } } @@ -153,7 +153,7 @@ public function submitOptionsForm(&$form, &$form_state) { unset($form_state['values']['expose_button']); // don't store this. $this->sort_submit($form, $form_state); if (!empty($this->options['exposed'])) { - $this->expose_submit($form, $form_state); + $this->submitExposeForm($form, $form_state); } } @@ -186,7 +186,7 @@ function sort_options() { ); } - function expose_form(&$form, &$form_state) { + public function buildExposeForm(&$form, &$form_state) { // #flatten will move everything from $form['expose'][$key] to $form[$key] // prior to rendering. That's why the pre_render for it needs to run first, // so that when the next pre_render (the one for fieldsets) runs, it gets @@ -207,7 +207,7 @@ function expose_form(&$form, &$form_state) { /** * Provide default options for exposed sorts. */ - function expose_options() { + public function defaultExposeOptions() { $this->options['expose'] = array( 'order' => $this->options['order'], 'label' => $this->definition['title'], diff --git a/lib/Drupal/views/Plugin/views/style/StylePluginBase.php b/lib/Drupal/views/Plugin/views/style/StylePluginBase.php index 89e79cee984742e4cf71323ba4bfc46ed5b263f0..02f7013ebfa2ed40ed7e35cc406c4005bc1d4f5c 100644 --- a/lib/Drupal/views/Plugin/views/style/StylePluginBase.php +++ b/lib/Drupal/views/Plugin/views/style/StylePluginBase.php @@ -89,7 +89,7 @@ abstract class StylePluginBase extends PluginBase { * The style options might come externally as the style can be sourced * from at least two locations. If it's not included, look on the display. */ - function init(&$view, &$display, $options = NULL) { + public function init(&$view, &$display, $options = NULL) { $this->view = &$view; $this->display = &$display; diff --git a/lib/Drupal/views/View.php b/lib/Drupal/views/View.php index b3a465c137661de1040dbea9e8dad93ffa2c9916..2064b6a9cc052bade538521ab8ddd656e652f938 100644 --- a/lib/Drupal/views/View.php +++ b/lib/Drupal/views/View.php @@ -724,7 +724,7 @@ public function getBaseTables() { } /** - * Run the pre_query() on all active handlers. + * Run the preQuery() on all active handlers. */ protected function _preQuery() { foreach (View::viewsObjectTypes() as $key => $info) { @@ -732,20 +732,20 @@ protected function _preQuery() { $position = 0; foreach ($handlers as $id => $handler) { $handlers[$id]->position = $position; - $handlers[$id]->pre_query(); + $handlers[$id]->preQuery(); $position++; } } } /** - * Run the post_execute() on all active handlers. + * Run the postExecute() on all active handlers. */ protected function _postExecute() { foreach (View::viewsObjectTypes() as $key => $info) { $handlers = &$this->$key; foreach ($handlers as $id => $handler) { - $handlers[$id]->post_execute($this->result); + $handlers[$id]->postExecute($this->result); } } } @@ -804,7 +804,7 @@ protected function _buildArguments() { continue; } - $argument->set_relationship(); + $argument->setRelationship(); $arg = isset($this->args[$position]) ? $this->args[$position] : NULL; $argument->position = $position; @@ -1081,27 +1081,27 @@ public function _build($key) { if (!empty($handlers[$id]) && is_object($handlers[$id])) { $multiple_exposed_input = array(0 => NULL); - if ($handlers[$id]->multiple_exposed_input()) { + if ($handlers[$id]->multipleExposedInput()) { $multiple_exposed_input = $handlers[$id]->group_multiple_exposed_input($this->exposed_data); } foreach ($multiple_exposed_input as $group_id) { // Give this handler access to the exposed filter input. if (!empty($this->exposed_data)) { $converted = FALSE; - if ($handlers[$id]->is_a_group()) { + if ($handlers[$id]->isAGroup()) { $converted = $handlers[$id]->convert_exposed_input($this->exposed_data, $group_id); $handlers[$id]->store_group_input($this->exposed_data, $converted); if (!$converted) { continue; } } - $rc = $handlers[$id]->accept_exposed_input($this->exposed_data); - $handlers[$id]->store_exposed_input($this->exposed_data, $rc); + $rc = $handlers[$id]->acceptExposedInput($this->exposed_data); + $handlers[$id]->storeExposedInput($this->exposed_data, $rc); if (!$rc) { continue; } } - $handlers[$id]->set_relationship(); + $handlers[$id]->setRelationship(); $handlers[$id]->query($this->display_handler->useGroupBy()); } } diff --git a/lib/Views/aggregator/Plugin/views/field/Category.php b/lib/Views/aggregator/Plugin/views/field/Category.php index f5714a974254378f1966a6c5217f82eed14b1bd1..493e3065ae784af4062e48ed6e5cbe78d7147dfb 100644 --- a/lib/Views/aggregator/Plugin/views/field/Category.php +++ b/lib/Views/aggregator/Plugin/views/field/Category.php @@ -66,7 +66,7 @@ function render_link($data, $values) { function render($values) { $value = $this->get_value($values); - return $this->render_link($this->sanitize_value($value), $values); + return $this->render_link($this->sanitizeValue($value), $values); } } diff --git a/lib/Views/aggregator/Plugin/views/field/TitleLink.php b/lib/Views/aggregator/Plugin/views/field/TitleLink.php index 8e3e932ebf2adaef532a8ddd9a3990a6ff7f3e81..10e19ef6942c78e388b202f254bd2e7201c9547e 100644 --- a/lib/Views/aggregator/Plugin/views/field/TitleLink.php +++ b/lib/Views/aggregator/Plugin/views/field/TitleLink.php @@ -50,7 +50,7 @@ public function buildOptionsForm(&$form, &$form_state) { function render($values) { $value = $this->get_value($values); - return $this->render_link($this->sanitize_value($value), $values); + return $this->render_link($this->sanitizeValue($value), $values); } function render_link($data, $values) { diff --git a/lib/Views/comment/Plugin/views/argument/UserUid.php b/lib/Views/comment/Plugin/views/argument/UserUid.php index 9dade8030eefdb7f1ecc5a8bc4c701ae65cef50e..89366107bf73dc3664bcf2314985c908717dbe4b 100644 --- a/lib/Views/comment/Plugin/views/argument/UserUid.php +++ b/lib/Views/comment/Plugin/views/argument/UserUid.php @@ -55,7 +55,7 @@ function default_actions($which = NULL) { } public function query($group_by = FALSE) { - $this->ensure_my_table(); + $this->ensureMyTable(); $subselect = db_select('comment', 'c'); $subselect->addField('c', 'cid'); diff --git a/lib/Views/comment/Plugin/views/field/Comment.php b/lib/Views/comment/Plugin/views/field/Comment.php index c76651ae888789e6a6c6e0400327c8cb6b84480b..dd6afde1a4b25257e22172fc630dc65fb0f8e4b3 100644 --- a/lib/Views/comment/Plugin/views/field/Comment.php +++ b/lib/Views/comment/Plugin/views/field/Comment.php @@ -25,7 +25,7 @@ class Comment extends FieldPluginBase { /** * Override init function to provide generic option to link to comment. */ - function init(&$view, &$options) { + public function init(&$view, &$options) { parent::init($view, $options); if (!empty($this->options['link_to_comment'])) { $this->additional_fields['cid'] = 'cid'; @@ -79,7 +79,7 @@ function render_link($data, $values) { function render($values) { $value = $this->get_value($values); - return $this->render_link($this->sanitize_value($value), $values); + return $this->render_link($this->sanitizeValue($value), $values); } } diff --git a/lib/Views/comment/Plugin/views/field/LinkApprove.php b/lib/Views/comment/Plugin/views/field/LinkApprove.php index 4a8cf395953273bbd227c0a18bf0c15b0260c764..6bdb3c09f820555b5d21b290737dc406e2260298 100644 --- a/lib/Views/comment/Plugin/views/field/LinkApprove.php +++ b/lib/Views/comment/Plugin/views/field/LinkApprove.php @@ -21,7 +21,7 @@ */ class LinkApprove extends Link { - function access() { + public function access() { //needs permission to administer comments in general return user_access('administer comments'); } diff --git a/lib/Views/comment/Plugin/views/field/LinkDelete.php b/lib/Views/comment/Plugin/views/field/LinkDelete.php index 43c49dc07ae0693858ef7342291c487b23bdf488..a445a6f957367e621dbfd8fa2d5fb900741bf3bb 100644 --- a/lib/Views/comment/Plugin/views/field/LinkDelete.php +++ b/lib/Views/comment/Plugin/views/field/LinkDelete.php @@ -21,7 +21,7 @@ */ class LinkDelete extends Link { - function access() { + public function access() { //needs permission to administer comments in general return user_access('administer comments'); } diff --git a/lib/Views/comment/Plugin/views/field/LinkReply.php b/lib/Views/comment/Plugin/views/field/LinkReply.php index 1cb36acb8944afeff8c51cd85d3c6805f4b0b94c..8ddfd79ecb3332799820244170d547c3c03d64b6 100644 --- a/lib/Views/comment/Plugin/views/field/LinkReply.php +++ b/lib/Views/comment/Plugin/views/field/LinkReply.php @@ -21,7 +21,7 @@ */ class LinkReply extends Link { - function access() { + public function access() { //check for permission to reply to comments return user_access('post comments'); } diff --git a/lib/Views/comment/Plugin/views/field/NcsLastCommentName.php b/lib/Views/comment/Plugin/views/field/NcsLastCommentName.php index 33135c44659c4d5e83638ecfe4667bab90917b98..bce8143c052dcc9dbf0772a9ceecff09dd27d207 100644 --- a/lib/Views/comment/Plugin/views/field/NcsLastCommentName.php +++ b/lib/Views/comment/Plugin/views/field/NcsLastCommentName.php @@ -25,7 +25,7 @@ class NcsLastCommentName extends FieldPluginBase { public function query() { // last_comment_name only contains data if the user is anonymous. So we // have to join in a specially related user table. - $this->ensure_my_table(); + $this->ensureMyTable(); // join 'users' to this table via vid $join = views_get_join(); $join->construct('users', $this->table_alias, 'last_comment_uid', 'uid'); @@ -59,7 +59,7 @@ function render($values) { )); } else { - return $this->sanitize_value($this->get_value($values)); + return $this->sanitizeValue($this->get_value($values)); } } diff --git a/lib/Views/comment/Plugin/views/field/NcsLastUpdated.php b/lib/Views/comment/Plugin/views/field/NcsLastUpdated.php index a3dcb3e5b47bc2bb6d1e0afba649d6eea3135c2d..2dce059a897c481d87498cd364def465ed73cff9 100644 --- a/lib/Views/comment/Plugin/views/field/NcsLastUpdated.php +++ b/lib/Views/comment/Plugin/views/field/NcsLastUpdated.php @@ -23,7 +23,7 @@ class NcsLastUpdated extends Date { public function query() { - $this->ensure_my_table(); + $this->ensureMyTable(); $this->node_table = $this->query->ensure_table('node', $this->relationship); $this->field_alias = $this->query->add_field(NULL, "GREATEST(" . $this->node_table . ".changed, " . $this->table_alias . ".last_comment_timestamp)", $this->table_alias . '_' . $this->field); } diff --git a/lib/Views/comment/Plugin/views/field/NodeNewComments.php b/lib/Views/comment/Plugin/views/field/NodeNewComments.php index 4777778cea742a388d455dd3f23395106108d289..813979ece829c19fb1825c5470cc664e23f46f7d 100644 --- a/lib/Views/comment/Plugin/views/field/NodeNewComments.php +++ b/lib/Views/comment/Plugin/views/field/NodeNewComments.php @@ -49,7 +49,7 @@ public function buildOptionsForm(&$form, &$form_state) { } public function query() { - $this->ensure_my_table(); + $this->ensureMyTable(); $this->add_additional_fields(); $this->field_alias = $this->table . '_' . $this->field; } diff --git a/lib/Views/comment/Plugin/views/field/Username.php b/lib/Views/comment/Plugin/views/field/Username.php index a271426b2ba08e47b0e0f2bd104aa15c8830c14b..025d4be58a9bb3c3bf9ee857893c4ce353c9131a 100644 --- a/lib/Views/comment/Plugin/views/field/Username.php +++ b/lib/Views/comment/Plugin/views/field/Username.php @@ -25,7 +25,7 @@ class Username extends FieldPluginBase { /** * Override init function to add uid and homepage fields. */ - function init(&$view, &$data) { + public function init(&$view, &$data) { parent::init($view, $data); $this->additional_fields['uid'] = 'uid'; $this->additional_fields['homepage'] = 'homepage'; @@ -64,7 +64,7 @@ function render_link($data, $values) { function render($values) { $value = $this->get_value($values); - return $this->render_link($this->sanitize_value($value), $values); + return $this->render_link($this->sanitizeValue($value), $values); } } diff --git a/lib/Views/comment/Plugin/views/filter/NcsLastUpdated.php b/lib/Views/comment/Plugin/views/filter/NcsLastUpdated.php index cd69888818f78548a0dc49b884fc72aaad307103..1a276a8d25565b83c5fa0382410d415ebcc86eaa 100644 --- a/lib/Views/comment/Plugin/views/filter/NcsLastUpdated.php +++ b/lib/Views/comment/Plugin/views/filter/NcsLastUpdated.php @@ -23,7 +23,7 @@ class NcsLastUpdated extends Date { public function query() { - $this->ensure_my_table(); + $this->ensureMyTable(); $this->node_table = $this->query->ensure_table('node', $this->relationship); $field = "GREATEST(" . $this->node_table . ".changed, " . $this->table_alias . ".last_comment_timestamp)"; diff --git a/lib/Views/comment/Plugin/views/filter/UserUid.php b/lib/Views/comment/Plugin/views/filter/UserUid.php index 97c4598835dbf126d0c2baa4a44eec467ad07565..83029d8bfc78b61bd874622ede647c15759bbd2e 100644 --- a/lib/Views/comment/Plugin/views/filter/UserUid.php +++ b/lib/Views/comment/Plugin/views/filter/UserUid.php @@ -24,7 +24,7 @@ class UserUid extends FilterPluginBase { public function query() { - $this->ensure_my_table(); + $this->ensureMyTable(); $subselect = db_select('comment', 'c'); $subselect->addField('c', 'cid'); diff --git a/lib/Views/comment/Plugin/views/sort/NcsLastCommentName.php b/lib/Views/comment/Plugin/views/sort/NcsLastCommentName.php index b81964771986825668e41b7757a82b0ea0f7973e..54b806cf510e05f7bd69b14ffa8c0ac68816e38b 100644 --- a/lib/Views/comment/Plugin/views/sort/NcsLastCommentName.php +++ b/lib/Views/comment/Plugin/views/sort/NcsLastCommentName.php @@ -24,7 +24,7 @@ class NcsLastCommentName extends SortPluginBase { public function query() { - $this->ensure_my_table(); + $this->ensureMyTable(); $join = views_get_join(); $join->construct('users', $this->table_alias, 'last_comment_uid', 'uid'); diff --git a/lib/Views/comment/Plugin/views/sort/NcsLastUpdated.php b/lib/Views/comment/Plugin/views/sort/NcsLastUpdated.php index 52328e3719fc3395b20ce0c6fd19da00c9b59a18..1b800ba4cbabf37ff91412fdee27a63b4682db62 100644 --- a/lib/Views/comment/Plugin/views/sort/NcsLastUpdated.php +++ b/lib/Views/comment/Plugin/views/sort/NcsLastUpdated.php @@ -23,7 +23,7 @@ class NcsLastUpdated extends Date { public function query() { - $this->ensure_my_table(); + $this->ensureMyTable(); $this->node_table = $this->query->ensure_table('node', $this->relationship); $this->field_alias = $this->query->add_orderby(NULL, "GREATEST(" . $this->node_table . ".changed, " . $this->table_alias . ".last_comment_timestamp)", $this->options['order'], $this->table_alias . '_' . $this->field); } diff --git a/lib/Views/comment/Plugin/views/sort/Thread.php b/lib/Views/comment/Plugin/views/sort/Thread.php index f98b3cd488a0db60fca7acc8ed9f9da2eed1aa40..c50026f078027bc2ef589b399832b94f4cff16c0 100644 --- a/lib/Views/comment/Plugin/views/sort/Thread.php +++ b/lib/Views/comment/Plugin/views/sort/Thread.php @@ -23,7 +23,7 @@ class Thread extends SortPluginBase { public function query() { - $this->ensure_my_table(); + $this->ensureMyTable(); //Read comment_render() in comment.module for an explanation of the //thinking behind this sort. diff --git a/lib/Views/contact/Plugin/views/field/ContactLink.php b/lib/Views/contact/Plugin/views/field/ContactLink.php index d160aa914f7cc6540151877d703e8f68ac6230b5..39b5c717e9e298745ef07758ae48872f64a76472 100644 --- a/lib/Views/contact/Plugin/views/field/ContactLink.php +++ b/lib/Views/contact/Plugin/views/field/ContactLink.php @@ -32,7 +32,7 @@ public function buildOptionsForm(&$form, &$form_state) { // An example of field level access control. // We must override the access method in the parent class, as that requires // the 'access user profiles' permission, which the contact form does not. - function access() { + public function access() { return user_access('access user contact forms'); } diff --git a/lib/Views/field/Plugin/views/argument/FieldList.php b/lib/Views/field/Plugin/views/argument/FieldList.php index 0a45db73e97c5b8cf708080eeb7afcc4bd67d5dd..8dc99c37f37dd276ff136c5bc9fd3e8ca9ae2e84 100644 --- a/lib/Views/field/Plugin/views/argument/FieldList.php +++ b/lib/Views/field/Plugin/views/argument/FieldList.php @@ -30,7 +30,7 @@ class FieldList extends Numeric { */ var $allowed_values = NULL; - function init(&$view, &$options) { + public function init(&$view, &$options) { parent::init($view, $options); $field = field_info_field($this->definition['field_name']); $this->allowed_values = options_allowed_values($field); diff --git a/lib/Views/field/Plugin/views/argument/ListString.php b/lib/Views/field/Plugin/views/argument/ListString.php index 8ce1e14bff345337657c7b0ea2362f7957ca2c34..a50af5a33c3dea660bfae32b2302fa5c73250bf6 100644 --- a/lib/Views/field/Plugin/views/argument/ListString.php +++ b/lib/Views/field/Plugin/views/argument/ListString.php @@ -30,7 +30,7 @@ class ListString extends String { */ var $allowed_values = NULL; - function init(&$view, &$options) { + public function init(&$view, &$options) { parent::init($view, $options); $field = field_info_field($this->definition['field_name']); $this->allowed_values = options_allowed_values($field); @@ -64,11 +64,11 @@ function summary_name($data) { $value = $data->{$this->name_alias}; // If the list element has a human readable name show it, if (isset($this->allowed_values[$value]) && !empty($this->options['summary']['human'])) { - return $this->case_transform(field_filter_xss($this->allowed_values[$value]), $this->options['case']); + return $this->caseTransform(field_filter_xss($this->allowed_values[$value]), $this->options['case']); } // else fallback to the key. else { - return $this->case_transform(check_plain($value), $this->options['case']); + return $this->caseTransform(check_plain($value), $this->options['case']); } } diff --git a/lib/Views/field/Plugin/views/field/Field.php b/lib/Views/field/Plugin/views/field/Field.php index c1d88ec829a7f11877a5e4090d097d3bc991fccf..d7b28726c4a6528ff042034060edfc3cf776b1e4 100644 --- a/lib/Views/field/Plugin/views/field/Field.php +++ b/lib/Views/field/Plugin/views/field/Field.php @@ -65,7 +65,7 @@ class Field extends FieldPluginBase { */ public $instance; - function init(&$view, &$options) { + public function init(&$view, &$options) { parent::init($view, $options); $this->field_info = $field = field_info_field($this->definition['field_name']); @@ -100,7 +100,7 @@ function init(&$view, &$options) { * @return bool * Return TRUE if the user has access to view this field. */ - function access() { + public function access() { $base_table = $this->get_base_table(); return field_access('view', $this->field_info, $this->definition['entity_tables'][$base_table]); } @@ -174,7 +174,7 @@ public function query($use_groupby = FALSE) { // Add additional fields (and the table join itself) if needed. if ($this->add_field_table($use_groupby)) { - $this->ensure_my_table(); + $this->ensureMyTable(); $this->add_additional_fields($fields); // Filter by langcode, if field translation is enabled. @@ -242,7 +242,7 @@ function click_sort($order) { return; } - $this->ensure_my_table(); + $this->ensureMyTable(); $column = _field_sql_storage_columnname($this->definition['field_name'], $this->options['click_sort_column']); if (!isset($this->aliases[$column])) { // Column is not in query; add a sort on it (without adding the column). @@ -529,8 +529,8 @@ function multiple_options_form(&$form, &$form_state) { /** * Extend the groupby form with group columns. */ - function groupby_form(&$form, &$form_state) { - parent::groupby_form($form, $form_state); + public function buildGroupByForm(&$form, &$form_state) { + parent::buildGroupByForm($form, $form_state); // With "field API" fields, the column target of the grouping function // and any additional grouping columns must be specified. $group_columns = array( @@ -557,8 +557,8 @@ function groupby_form(&$form, &$form_state) { ); } - function groupby_form_submit(&$form, &$form_state) { - parent::groupby_form_submit($form, $form_state); + public function submitGroupByForm(&$form, &$form_state) { + parent::submitGroupByForm($form, $form_state); $item =& $form_state['handler']->options; // Add settings for "field API" fields. diff --git a/lib/Views/field/Plugin/views/relationship/EntityReverse.php b/lib/Views/field/Plugin/views/relationship/EntityReverse.php index cede9491e0c512fc39c28907daed4055df8a7a71..a02519142dc96119c8a67d74a8dcc96c00e3d2b2 100644 --- a/lib/Views/field/Plugin/views/relationship/EntityReverse.php +++ b/lib/Views/field/Plugin/views/relationship/EntityReverse.php @@ -22,7 +22,7 @@ */ class EntityReverse extends RelationshipPluginBase { - function init(&$view, &$options) { + public function init(&$view, &$options) { parent::init($view, $options); $this->field_info = field_info_field($this->definition['field_name']); @@ -32,7 +32,7 @@ function init(&$view, &$options) { * Called to implement a relationship in a query. */ public function query() { - $this->ensure_my_table(); + $this->ensureMyTable(); // First, relate our base table to the current base table to the // field, using the base table's id field to the field's column. $views_data = views_fetch_data($this->table); diff --git a/lib/Views/file/Plugin/views/field/Extension.php b/lib/Views/file/Plugin/views/field/Extension.php index 9475cf97dfea47d43409307c4dcab5c73d2ccf7f..792bb137214e73f56a6145c1bb64c93294b6e822 100644 --- a/lib/Views/file/Plugin/views/field/Extension.php +++ b/lib/Views/file/Plugin/views/field/Extension.php @@ -25,7 +25,7 @@ class Extension extends FieldPluginBase { function render($values) { $value = $this->get_value($values); if (preg_match('/\.([^\.]+)$/', $value, $match)) { - return $this->sanitize_value($match[1]); + return $this->sanitizeValue($match[1]); } } diff --git a/lib/Views/file/Plugin/views/field/File.php b/lib/Views/file/Plugin/views/field/File.php index 9341ad63defe6a2ba11b15f9a29ef02b7db72788..c4b6a8742d19b48854606e6de2b272e2e052be80 100644 --- a/lib/Views/file/Plugin/views/field/File.php +++ b/lib/Views/file/Plugin/views/field/File.php @@ -25,7 +25,7 @@ class File extends FieldPluginBase { /** * Constructor to provide additional field to add. */ - function init(&$view, &$options) { + public function init(&$view, &$options) { parent::init($view, $options); if (!empty($options['link_to_file'])) { $this->additional_fields['uri'] = 'uri'; @@ -67,7 +67,7 @@ function render_link($data, $values) { function render($values) { $value = $this->get_value($values); - return $this->render_link($this->sanitize_value($value), $values); + return $this->render_link($this->sanitizeValue($value), $values); } } diff --git a/lib/Views/filter/Plugin/views/field/FormatName.php b/lib/Views/filter/Plugin/views/field/FormatName.php index d02a017886e65e0927d8b556b3288883f1eb16de..0c26092fd550e5acd18e6be6e024ec8997ca714e 100644 --- a/lib/Views/filter/Plugin/views/field/FormatName.php +++ b/lib/Views/filter/Plugin/views/field/FormatName.php @@ -29,7 +29,7 @@ public function construct() { } public function query() { - $this->ensure_my_table(); + $this->ensureMyTable(); $this->add_additional_fields(); } @@ -40,9 +40,9 @@ function render($values) { // filter_formats() will reliably return the default format even if the // current user is unprivileged. $format = filter_formats(filter_default_format()); - return $this->sanitize_value($format->name); + return $this->sanitizeValue($format->name); } - return $this->sanitize_value($format_name); + return $this->sanitizeValue($format_name); } } diff --git a/lib/Views/locale/Plugin/views/field/LinkEdit.php b/lib/Views/locale/Plugin/views/field/LinkEdit.php index 7f4bc992bd5a7ec90d98f89acec825c40135aad2..2fe9a7aa4bed524cf7757276dd488f03fc3f778a 100644 --- a/lib/Views/locale/Plugin/views/field/LinkEdit.php +++ b/lib/Views/locale/Plugin/views/field/LinkEdit.php @@ -45,18 +45,18 @@ public function buildOptionsForm(&$form, &$form_state) { } public function query() { - $this->ensure_my_table(); + $this->ensureMyTable(); $this->add_additional_fields(); } - function access() { + public function access() { // Ensure user has access to edit translations. return user_access('translate interface'); } function render($values) { $value = $this->get_value($values, 'lid'); - return $this->render_link($this->sanitize_value($value), $values); + return $this->render_link($this->sanitizeValue($value), $values); } function render_link($data, $values) { diff --git a/lib/Views/node/Plugin/views/argument/UidRevision.php b/lib/Views/node/Plugin/views/argument/UidRevision.php index 67315483ac0a2f5394cf345526adcc41a8a3bb20..7263e6761e55125740c2e908756cf03742781efe 100644 --- a/lib/Views/node/Plugin/views/argument/UidRevision.php +++ b/lib/Views/node/Plugin/views/argument/UidRevision.php @@ -22,7 +22,7 @@ class UidRevision extends Uid { public function query($group_by = FALSE) { - $this->ensure_my_table(); + $this->ensureMyTable(); $placeholder = $this->placeholder(); $this->query->add_where_expression(0, "$this->table_alias.uid = $placeholder OR ((SELECT COUNT(*) FROM {node_revision} nr WHERE nr.uid = $placeholder AND nr.nid = $this->table_alias.nid) > 0)", array($placeholder => $this->argument)); } diff --git a/lib/Views/node/Plugin/views/field/HistoryUserTimestamp.php b/lib/Views/node/Plugin/views/field/HistoryUserTimestamp.php index 980ce01912256bf727b49d57df2257a005e9ccd8..74b63b7f38794f3eec3be59a8c6b68eec97eaa89 100644 --- a/lib/Views/node/Plugin/views/field/HistoryUserTimestamp.php +++ b/lib/Views/node/Plugin/views/field/HistoryUserTimestamp.php @@ -25,7 +25,7 @@ */ class HistoryUserTimestamp extends Node { - function init(&$view, &$options) { + public function init(&$view, &$options) { parent::init($view, $options); global $user; if ($user->uid) { diff --git a/lib/Views/node/Plugin/views/field/Node.php b/lib/Views/node/Plugin/views/field/Node.php index 360c2aa069d1f961f730f7edcb80e3ca7b62bf2b..2995cb6877693125e641b70a20f2242c59ecd47d 100644 --- a/lib/Views/node/Plugin/views/field/Node.php +++ b/lib/Views/node/Plugin/views/field/Node.php @@ -24,7 +24,7 @@ */ class Node extends FieldPluginBase { - function init(&$view, &$options) { + public function init(&$view, &$options) { parent::init($view, $options); // Don't add the additional fields to groupby if (!empty($this->options['link_to_node'])) { @@ -85,7 +85,7 @@ function render_link($data, $values) { function render($values) { $value = $this->get_value($values); - return $this->render_link($this->sanitize_value($value), $values); + return $this->render_link($this->sanitizeValue($value), $values); } } diff --git a/lib/Views/node/Plugin/views/field/Path.php b/lib/Views/node/Plugin/views/field/Path.php index cdb8af07167f202d71febbc153b3c6130932f4fe..3f95eb38d22495904c355e6e382a887ee2987757 100644 --- a/lib/Views/node/Plugin/views/field/Path.php +++ b/lib/Views/node/Plugin/views/field/Path.php @@ -46,7 +46,7 @@ public function buildOptionsForm(&$form, &$form_state) { } public function query() { - $this->ensure_my_table(); + $this->ensureMyTable(); $this->add_additional_fields(); } diff --git a/lib/Views/node/Plugin/views/field/Revision.php b/lib/Views/node/Plugin/views/field/Revision.php index 284714f538b21b99662c28cdabf2ed2d49d04351..aeb000c69e14f6b5f7c4919e84d537b31e7724d6 100644 --- a/lib/Views/node/Plugin/views/field/Revision.php +++ b/lib/Views/node/Plugin/views/field/Revision.php @@ -22,7 +22,7 @@ */ class Revision extends Node { - function init(&$view, &$options) { + public function init(&$view, &$options) { parent::init($view, $options); if (!empty($this->options['link_to_node_revision'])) { $this->additional_fields['vid'] = 'vid'; diff --git a/lib/Views/node/Plugin/views/field/RevisionLink.php b/lib/Views/node/Plugin/views/field/RevisionLink.php index 1fa4dd004641c4c6e231725e1265e241e11629a7..bd892df982df6655946e3bbb720e195f5f9c7e79 100644 --- a/lib/Views/node/Plugin/views/field/RevisionLink.php +++ b/lib/Views/node/Plugin/views/field/RevisionLink.php @@ -27,7 +27,7 @@ public function construct() { $this->additional_fields['node_vid'] = array('table' => 'node_revision', 'field' => 'vid'); } - function access() { + public function access() { return user_access('view revisions') || user_access('administer nodes'); } diff --git a/lib/Views/node/Plugin/views/field/RevisionLinkDelete.php b/lib/Views/node/Plugin/views/field/RevisionLinkDelete.php index 8ea730e4f532bc875084faf98daa08906809175f..ecb9208408002ec0319f53c32486065961056fe1 100644 --- a/lib/Views/node/Plugin/views/field/RevisionLinkDelete.php +++ b/lib/Views/node/Plugin/views/field/RevisionLinkDelete.php @@ -22,7 +22,7 @@ */ class RevisionLinkDelete extends RevisionLink { - function access() { + public function access() { return user_access('delete revisions') || user_access('administer nodes'); } diff --git a/lib/Views/node/Plugin/views/field/RevisionLinkRevert.php b/lib/Views/node/Plugin/views/field/RevisionLinkRevert.php index 4c38413425064011c52c44c4c6a1f5ac4a84a3b6..bad0e2ec95a25661da265087d24c4d6ce6d72f44 100644 --- a/lib/Views/node/Plugin/views/field/RevisionLinkRevert.php +++ b/lib/Views/node/Plugin/views/field/RevisionLinkRevert.php @@ -22,7 +22,7 @@ */ class RevisionLinkRevert extends RevisionLink { - function access() { + public function access() { return user_access('revert revisions') || user_access('administer nodes'); } diff --git a/lib/Views/node/Plugin/views/field/Type.php b/lib/Views/node/Plugin/views/field/Type.php index 003d916eddbc76809bd918a92bf8f3b6e4906135..72f4c10e5afde605f5616533adb955fcac3f8eee 100644 --- a/lib/Views/node/Plugin/views/field/Type.php +++ b/lib/Views/node/Plugin/views/field/Type.php @@ -48,9 +48,9 @@ public function buildOptionsForm(&$form, &$form_state) { */ function render_name($data, $values) { if ($this->options['machine_name'] != 1 && $data !== NULL && $data !== '') { - return t($this->sanitize_value(node_type_get_name($data))); + return t($this->sanitizeValue(node_type_get_name($data))); } - return $this->sanitize_value($data); + return $this->sanitizeValue($data); } function render($values) { diff --git a/lib/Views/node/Plugin/views/filter/Access.php b/lib/Views/node/Plugin/views/filter/Access.php index 166095271c3f513d04edab11c704124b8fb816aa..a532c50879feb5e997798b491788ea7401a613f3 100644 --- a/lib/Views/node/Plugin/views/filter/Access.php +++ b/lib/Views/node/Plugin/views/filter/Access.php @@ -22,9 +22,9 @@ */ class Access extends FilterPluginBase { - function admin_summary() { } + public function adminSummary() { } function operator_form(&$form, &$form_state) { } - function can_expose() { + public function canExpose() { return FALSE; } @@ -33,7 +33,7 @@ function can_expose() { */ public function query() { if (!user_access('administer nodes')) { - $table = $this->ensure_my_table(); + $table = $this->ensureMyTable(); $grants = db_or(); foreach (node_access_grants('view') as $realm => $gids) { foreach ($gids as $gid) { diff --git a/lib/Views/node/Plugin/views/filter/HistoryUserTimestamp.php b/lib/Views/node/Plugin/views/filter/HistoryUserTimestamp.php index 685aeff7daf413cf09d3351d1dbd44711dc64ad3..c7323b79de908371105e74ea36b47e9361ccfdc4 100644 --- a/lib/Views/node/Plugin/views/filter/HistoryUserTimestamp.php +++ b/lib/Views/node/Plugin/views/filter/HistoryUserTimestamp.php @@ -28,8 +28,8 @@ class HistoryUserTimestamp extends FilterPluginBase { // Don't display empty space where the operator would be. var $no_operator = TRUE; - function expose_form(&$form, &$form_state) { - parent::expose_form($form, $form_state); + public function buildExposeForm(&$form, &$form_state) { + parent::buildExposeForm($form, $form_state); // @todo There are better ways of excluding required and multiple (object flags) unset($form['expose']['required']); unset($form['expose']['multiple']); @@ -72,7 +72,7 @@ public function query() { $limit = REQUEST_TIME - NODE_NEW_LIMIT; - $this->ensure_my_table(); + $this->ensureMyTable(); $field = "$this->table_alias.$this->real_field"; $node = $this->query->ensure_table('node', $this->relationship); @@ -90,7 +90,7 @@ public function query() { $this->query->add_where_expression($this->options['group'], "($field IS NULL AND ($node.changed > (***CURRENT_TIME*** - $limit) $clause)) OR $field < $node.changed $clause2"); } - function admin_summary() { + public function adminSummary() { if (!empty($this->options['exposed'])) { return t('exposed'); } diff --git a/lib/Views/node/Plugin/views/filter/Status.php b/lib/Views/node/Plugin/views/filter/Status.php index ed32a523308dfebfce3af4e4cd04f096a6c09ae3..3297ae6c7d3efe45315d2d2e765f2df93c8896f2 100644 --- a/lib/Views/node/Plugin/views/filter/Status.php +++ b/lib/Views/node/Plugin/views/filter/Status.php @@ -22,14 +22,14 @@ */ class Status extends FilterPluginBase { - function admin_summary() { } + public function adminSummary() { } function operator_form(&$form, &$form_state) { } - function can_expose() { return FALSE; } + public function canExpose() { return FALSE; } public function query() { - $table = $this->ensure_my_table(); + $table = $this->ensureMyTable(); $this->query->add_where_expression($this->options['group'], "$table.status = 1 OR ($table.uid = ***CURRENT_USER*** AND ***CURRENT_USER*** <> 0 AND ***VIEW_OWN_UNPUBLISHED_NODES*** = 1) OR ***BYPASS_NODE_ACCESS*** = 1"); } diff --git a/lib/Views/node/Plugin/views/filter/UidRevision.php b/lib/Views/node/Plugin/views/filter/UidRevision.php index 48f75e395acc3d237dcf4a26d68343efceb43a34..fb2f5641a3bfb06b7fb7fc0247476765cb0d6e85 100644 --- a/lib/Views/node/Plugin/views/filter/UidRevision.php +++ b/lib/Views/node/Plugin/views/filter/UidRevision.php @@ -23,7 +23,7 @@ class UidRevision extends Name { public function query($group_by = FALSE) { - $this->ensure_my_table(); + $this->ensureMyTable(); $placeholder = $this->placeholder(); diff --git a/lib/Views/node/Plugin/views/row/View.php b/lib/Views/node/Plugin/views/row/View.php index aa70993f828a0858cfb6bf60eddae07873734276..e49fb85a655b51ca31e87161b956fde1190e3ed1 100644 --- a/lib/Views/node/Plugin/views/row/View.php +++ b/lib/Views/node/Plugin/views/row/View.php @@ -37,7 +37,7 @@ class View extends RowPluginBase { // Stores the nodes loaded with pre_render. var $nodes = array(); - function init(&$view, &$display, $options = NULL) { + public function init(&$view, &$display, $options = NULL) { parent::init($view, $display, $options); // Handle existing views with the deprecated 'teaser' option. if (isset($this->options['teaser'])) { diff --git a/lib/Views/search/Plugin/views/argument/Search.php b/lib/Views/search/Plugin/views/argument/Search.php index e394c6b7bf2b1ef970b83b0adef3e85dd7d82509..31313a0afa060f7c5aa82f06444253d97de26b3a 100644 --- a/lib/Views/search/Plugin/views/argument/Search.php +++ b/lib/Views/search/Plugin/views/argument/Search.php @@ -57,7 +57,7 @@ public function query($group_by = FALSE) { } } else { - $search_index = $this->ensure_my_table(); + $search_index = $this->ensureMyTable(); $search_condition = db_and(); diff --git a/lib/Views/search/Plugin/views/field/Score.php b/lib/Views/search/Plugin/views/field/Score.php index d8cade30abc50e9ed955bc239b05e0f140d82df5..b78a04544ce293a423f504cfcfe00b5237da0f76 100644 --- a/lib/Views/search/Plugin/views/field/Score.php +++ b/lib/Views/search/Plugin/views/field/Score.php @@ -37,7 +37,7 @@ public function buildOptionsForm(&$form, &$form_state) { $handlers = $this->view->display_handler->getHandlers('field'); $options = array('' => t('No alternate')); foreach ($handlers as $id => $handler) { - $options[$id] = $handler->ui_name(); + $options[$id] = $handler->uiName(); } $form['alternate_sort'] = array( diff --git a/lib/Views/search/Plugin/views/filter/Search.php b/lib/Views/search/Plugin/views/filter/Search.php index 15f4a4bfffd261dfa63634942a7891897d30e22b..5f5cc16c325dd1b2326a9c579d7541fbc4092826 100644 --- a/lib/Views/search/Plugin/views/filter/Search.php +++ b/lib/Views/search/Plugin/views/filter/Search.php @@ -79,7 +79,7 @@ function value_form(&$form, &$form_state) { /** * Validate the options form. */ - function exposed_validate(&$form, &$form_state) { + public function validateExposed(&$form, &$form_state) { if (!isset($this->options['expose']['identifier'])) { return; } @@ -137,7 +137,7 @@ public function query() { } } else { - $search_index = $this->ensure_my_table(); + $search_index = $this->ensureMyTable(); $search_condition = db_and(); diff --git a/lib/Views/statistics/Plugin/views/field/AccesslogPath.php b/lib/Views/statistics/Plugin/views/field/AccesslogPath.php index 8e2ca80dd522973f781dc22616db23646fe5052c..05eed4cf2c5677318836ba379e87d05a97e71b5c 100644 --- a/lib/Views/statistics/Plugin/views/field/AccesslogPath.php +++ b/lib/Views/statistics/Plugin/views/field/AccesslogPath.php @@ -25,7 +25,7 @@ class AccesslogPath extends FieldPluginBase { /** * Override init function to provide generic option to link to node. */ - function init(&$view, &$options) { + public function init(&$view, &$options) { parent::init($view, $options); if (!empty($this->options['display_as_link'])) { $this->additional_fields['path'] = 'path'; @@ -54,7 +54,7 @@ public function buildOptionsForm(&$form, &$form_state) { function render($values) { $value = $this->get_value($values); - return $this->render_link($this->sanitize_value($value), $values); + return $this->render_link($this->sanitizeValue($value), $values); } function render_link($data, $values) { diff --git a/lib/Views/taxonomy/Plugin/views/argument/IndexTidDepth.php b/lib/Views/taxonomy/Plugin/views/argument/IndexTidDepth.php index 52db31c3b3d157ced84a597a7de6b29d23615fd3..e8119afda8975902bc1e19a75cc663adc159c90f 100644 --- a/lib/Views/taxonomy/Plugin/views/argument/IndexTidDepth.php +++ b/lib/Views/taxonomy/Plugin/views/argument/IndexTidDepth.php @@ -99,7 +99,7 @@ function default_actions($which = NULL) { } public function query($group_by = FALSE) { - $this->ensure_my_table(); + $this->ensureMyTable(); if (!empty($this->options['break_phrase'])) { $tids = new stdClass(); diff --git a/lib/Views/taxonomy/Plugin/views/argument/IndexTidDepthModifier.php b/lib/Views/taxonomy/Plugin/views/argument/IndexTidDepthModifier.php index bad61818d654ccba34c321298a31c13622e476de..a10fed4215afc7e863560bbbf65b428c42cbb0db 100644 --- a/lib/Views/taxonomy/Plugin/views/argument/IndexTidDepthModifier.php +++ b/lib/Views/taxonomy/Plugin/views/argument/IndexTidDepthModifier.php @@ -29,7 +29,7 @@ public function buildOptionsForm(&$form, &$form_state) { } public function query($group_by = FALSE) { } - function pre_query() { + public function preQuery() { // We don't know our argument yet, but it's based upon our position: $argument = isset($this->view->args[$this->position]) ? $this->view->args[$this->position] : NULL; if (!is_numeric($argument)) { diff --git a/lib/Views/taxonomy/Plugin/views/argument_default/Tid.php b/lib/Views/taxonomy/Plugin/views/argument_default/Tid.php index c81b8a8beebaa0a68bd72e480f4b0bce1717d8be..9086e66cce79445400878bf9dc1c7f1c0ff032bf 100644 --- a/lib/Views/taxonomy/Plugin/views/argument_default/Tid.php +++ b/lib/Views/taxonomy/Plugin/views/argument_default/Tid.php @@ -22,7 +22,7 @@ */ class Tid extends ArgumentDefaultPluginBase { - function init(&$view, &$argument, $options) { + public function init(&$view, &$argument, $options) { parent::init($view, $argument, $options); // Convert legacy vids option to machine name vocabularies. diff --git a/lib/Views/taxonomy/Plugin/views/argument_validator/Term.php b/lib/Views/taxonomy/Plugin/views/argument_validator/Term.php index 52adf1f64001f2fbb040c1ca9a71ee1d8920fd73..16c1b80cefa9fef9d7776749f9c2601de3682b4e 100644 --- a/lib/Views/taxonomy/Plugin/views/argument_validator/Term.php +++ b/lib/Views/taxonomy/Plugin/views/argument_validator/Term.php @@ -22,7 +22,7 @@ */ class Term extends ArgumentValidatorPluginBase { - function init(&$view, &$argument, $options) { + public function init(&$view, &$argument, $options) { parent::init($view, $argument, $options); // Convert legacy vids option to machine name vocabularies. diff --git a/lib/Views/taxonomy/Plugin/views/field/LinkEdit.php b/lib/Views/taxonomy/Plugin/views/field/LinkEdit.php index da9e8ec86d1b74469dda06a091ea83c1bb4408bc..e6ddf1db1f6e73780b9c70b295b0d42447cc4489 100644 --- a/lib/Views/taxonomy/Plugin/views/field/LinkEdit.php +++ b/lib/Views/taxonomy/Plugin/views/field/LinkEdit.php @@ -50,7 +50,7 @@ public function buildOptionsForm(&$form, &$form_state) { } public function query() { - $this->ensure_my_table(); + $this->ensureMyTable(); $this->add_additional_fields(); } diff --git a/lib/Views/taxonomy/Plugin/views/field/Taxonomy.php b/lib/Views/taxonomy/Plugin/views/field/Taxonomy.php index a48a8c3f9b7184b7a101e2f7cc640bd416c288d0..8475e243e09e7d4c14c8b30a6bc82a5f046f8d05 100644 --- a/lib/Views/taxonomy/Plugin/views/field/Taxonomy.php +++ b/lib/Views/taxonomy/Plugin/views/field/Taxonomy.php @@ -92,7 +92,7 @@ function render_link($data, $values) { function render($values) { $value = $this->get_value($values); - return $this->render_link($this->sanitize_value($value), $values); + return $this->render_link($this->sanitizeValue($value), $values); } } diff --git a/lib/Views/taxonomy/Plugin/views/field/TaxonomyIndexTid.php b/lib/Views/taxonomy/Plugin/views/field/TaxonomyIndexTid.php index 700913a358ce4fe1c117c3efb140ce0117d7bab5..6deeb3470e673002f79cb4c309435990fb8080b1 100644 --- a/lib/Views/taxonomy/Plugin/views/field/TaxonomyIndexTid.php +++ b/lib/Views/taxonomy/Plugin/views/field/TaxonomyIndexTid.php @@ -22,7 +22,7 @@ */ class TaxonomyIndexTid extends PrerenderList { - function init(&$view, &$options) { + public function init(&$view, &$options) { parent::init($view, $options); // @todo: Wouldn't it be possible to use $this->base_table and no if here? if ($view->base_table == 'node_revision') { diff --git a/lib/Views/taxonomy/Plugin/views/filter/TaxonomyIndexTid.php b/lib/Views/taxonomy/Plugin/views/filter/TaxonomyIndexTid.php index 6852355fb5a5b4186c8cb327a27501c2b1cbdb83..1e11a3beeef7ddab32c50cc9ce77107dbc69b473 100644 --- a/lib/Views/taxonomy/Plugin/views/filter/TaxonomyIndexTid.php +++ b/lib/Views/taxonomy/Plugin/views/filter/TaxonomyIndexTid.php @@ -25,7 +25,7 @@ class TaxonomyIndexTid extends ManyToOne { // Stores the exposed input for this filter. var $validated_exposed_input = NULL; - function init(&$view, &$options) { + public function init(&$view, &$options) { parent::init($view, $options); if (!empty($this->definition['vocabulary'])) { $this->options['vocabulary'] = $this->definition['vocabulary']; @@ -41,7 +41,7 @@ function init(&$view, &$options) { } } - function has_extra_options() { return TRUE; } + public function hasExtraOptions() { return TRUE; } function get_value_options() { /* don't overwrite the value options */ } @@ -57,7 +57,7 @@ protected function defineOptions() { return $options; } - function extra_options_form(&$form, &$form_state) { + public function buildExtraOptionsForm(&$form, &$form_state) { $vocabularies = taxonomy_vocabulary_get_names(); $options = array(); foreach ($vocabularies as $voc) { @@ -233,7 +233,7 @@ function value_validate($form, &$form_state) { } } - function accept_exposed_input($input) { + public function acceptExposedInput($input) { if (empty($this->options['exposed'])) { return TRUE; } @@ -249,7 +249,7 @@ function accept_exposed_input($input) { return FALSE; } - $rc = parent::accept_exposed_input($input); + $rc = parent::acceptExposedInput($input); if ($rc) { // If we have previously validated input, override. if (isset($this->validated_exposed_input)) { @@ -260,7 +260,7 @@ function accept_exposed_input($input) { return $rc; } - function exposed_validate(&$form, &$form_state) { + public function validateExposed(&$form, &$form_state) { if (empty($this->options['exposed'])) { return; } @@ -343,8 +343,8 @@ function value_submit($form, &$form_state) { // prevent array_filter from messing up our arrays in parent submit. } - function expose_form(&$form, &$form_state) { - parent::expose_form($form, $form_state); + public function buildExposeForm(&$form, &$form_state) { + parent::buildExposeForm($form, $form_state); if ($this->options['type'] != 'select') { unset($form['expose']['reduce']); } @@ -355,7 +355,7 @@ function expose_form(&$form, &$form_state) { ); } - function admin_summary() { + public function adminSummary() { // set up $this->value_options for the parent summary $this->value_options = array(); @@ -369,7 +369,7 @@ function admin_summary() { $this->value_options[$term->tid] = $term->name; } } - return parent::admin_summary(); + return parent::adminSummary(); } } diff --git a/lib/Views/taxonomy/Plugin/views/filter/TaxonomyIndexTidDepth.php b/lib/Views/taxonomy/Plugin/views/filter/TaxonomyIndexTidDepth.php index 09f3f659807ed9e4a8678b55922c4c79fdbaba64..1e4775bf56d40879b9eb0a076315c8da397b7e9f 100644 --- a/lib/Views/taxonomy/Plugin/views/filter/TaxonomyIndexTidDepth.php +++ b/lib/Views/taxonomy/Plugin/views/filter/TaxonomyIndexTidDepth.php @@ -38,8 +38,8 @@ protected function defineOptions() { return $options; } - function extra_options_form(&$form, &$form_state) { - parent::extra_options_form($form, $form_state); + public function buildExtraOptionsForm(&$form, &$form_state) { + parent::buildExtraOptionsForm($form, $form_state); $form['depth'] = array( '#type' => 'weight', @@ -65,7 +65,7 @@ public function query() { $operator = 'IN';# " IN (" . implode(', ', array_fill(0, sizeof($this->value), '%d')) . ")"; } - // The normal use of ensure_my_table() here breaks Views. + // The normal use of ensureMyTable() here breaks Views. // So instead we trick the filter into using the alias of the base table. // See http://drupal.org/node/271833 // If a relationship is set, we must use the alias it provides. diff --git a/lib/Views/taxonomy/Plugin/views/relationship/NodeTermData.php b/lib/Views/taxonomy/Plugin/views/relationship/NodeTermData.php index f9f988c46f7283a0330cc5b4b1ac6a663219e7c4..bfa29f819e3f526492fce184193387a491d5ae53 100644 --- a/lib/Views/taxonomy/Plugin/views/relationship/NodeTermData.php +++ b/lib/Views/taxonomy/Plugin/views/relationship/NodeTermData.php @@ -22,7 +22,7 @@ */ class NodeTermData extends RelationshipPluginBase { - function init(&$view, &$options) { + public function init(&$view, &$options) { parent::init($view, $options); // Convert legacy vids option to machine name vocabularies. @@ -63,7 +63,7 @@ public function buildOptionsForm(&$form, &$form_state) { * Called to implement a relationship in a query. */ public function query() { - $this->ensure_my_table(); + $this->ensureMyTable(); $def = $this->definition; $def['table'] = 'taxonomy_term_data'; diff --git a/lib/Views/translation/Plugin/views/field/NodeTranslationLink.php b/lib/Views/translation/Plugin/views/field/NodeTranslationLink.php index 5079dde2b6bc56cd9b8955da9eec1b72111e450b..ac82893d74325959cf4eeb645dfb946426eb1afb 100644 --- a/lib/Views/translation/Plugin/views/field/NodeTranslationLink.php +++ b/lib/Views/translation/Plugin/views/field/NodeTranslationLink.php @@ -31,13 +31,13 @@ public function construct() { } public function query() { - $this->ensure_my_table(); + $this->ensureMyTable(); $this->add_additional_fields(); } function render($values) { $value = $this->get_value($values, 'tnid'); - return $this->render_link($this->sanitize_value($value), $values); + return $this->render_link($this->sanitizeValue($value), $values); } function render_link($data, $values) { diff --git a/lib/Views/translation/Plugin/views/filter/NodeTnid.php b/lib/Views/translation/Plugin/views/filter/NodeTnid.php index 57db89374267ccc9a16f947728de520915ed560a..af11db0cf84e5feada0e679a644d22074dec0ed7 100644 --- a/lib/Views/translation/Plugin/views/filter/NodeTnid.php +++ b/lib/Views/translation/Plugin/views/filter/NodeTnid.php @@ -22,7 +22,7 @@ */ class NodeTnid extends FilterPluginBase { - function admin_summary() { } + public function adminSummary() { } protected function defineOptions() { $options = parent::defineOptions(); @@ -47,10 +47,10 @@ function operator_form(&$form, &$form_state) { ); } - function can_expose() { return FALSE; } + public function canExpose() { return FALSE; } public function query() { - $table = $this->ensure_my_table(); + $table = $this->ensureMyTable(); // Select for source translations (tnid = nid). Conditionally, also accept either untranslated nodes (tnid = 0). $this->query->add_where_expression($this->options['group'], "$table.tnid = $table.nid" . ($this->operator ? " OR $table.tnid = 0" : '')); } diff --git a/lib/Views/translation/Plugin/views/filter/NodeTnidChild.php b/lib/Views/translation/Plugin/views/filter/NodeTnidChild.php index 8c0662d467b7f991cd30fe67865cb11bf6c00012..f05606257345a508e923f98837a63508f9c5b67d 100644 --- a/lib/Views/translation/Plugin/views/filter/NodeTnidChild.php +++ b/lib/Views/translation/Plugin/views/filter/NodeTnidChild.php @@ -22,14 +22,14 @@ */ class NodeTnidChild extends FilterPluginBase { - function admin_summary() { } + public function adminSummary() { } function operator_form(&$form, &$form_state) { } - function can_expose() { return FALSE; } + public function canExpose() { return FALSE; } public function query() { - $table = $this->ensure_my_table(); + $table = $this->ensureMyTable(); $this->query->add_where_expression($this->options['group'], "$table.tnid <> $table.nid AND $table.tnid > 0"); } diff --git a/lib/Views/translation/Plugin/views/relationship/Translation.php b/lib/Views/translation/Plugin/views/relationship/Translation.php index c1f434b39b4ff50a4317c34739054f6fcd4e8de0..21675b0f2c4dc602f174356e46542f30c91d845d 100644 --- a/lib/Views/translation/Plugin/views/relationship/Translation.php +++ b/lib/Views/translation/Plugin/views/relationship/Translation.php @@ -59,7 +59,7 @@ public function query() { $table_data = views_fetch_data($this->definition['base']); $base_field = empty($this->definition['base field']) ? $table_data['table']['base']['field'] : $this->definition['base field']; - $this->ensure_my_table(); + $this->ensureMyTable(); $def = $this->definition; $def['table'] = $this->definition['base']; diff --git a/lib/Views/user/Plugin/views/field/Language.php b/lib/Views/user/Plugin/views/field/Language.php index 8f861a528dc5bafddaaa26573c9d6c4f95aff94c..0a4c160f363aa57390b2ea0386cc3c9c93dcdc3e 100644 --- a/lib/Views/user/Plugin/views/field/Language.php +++ b/lib/Views/user/Plugin/views/field/Language.php @@ -38,12 +38,12 @@ function render_link($data, $values) { $lang = $lang[$data]; } - return $this->sanitize_value($lang->name); + return $this->sanitizeValue($lang->name); } function render($values) { $value = $this->get_value($values); - return $this->render_link($this->sanitize_value($value), $values); + return $this->render_link($this->sanitizeValue($value), $values); } } diff --git a/lib/Views/user/Plugin/views/field/Link.php b/lib/Views/user/Plugin/views/field/Link.php index 6033c2c6847a881b223572853037ff223c870d2b..ea42fe67f9910dfec9d3c1a37fed7bb0458bc1b9 100644 --- a/lib/Views/user/Plugin/views/field/Link.php +++ b/lib/Views/user/Plugin/views/field/Link.php @@ -43,18 +43,18 @@ public function buildOptionsForm(&$form, &$form_state) { } // An example of field level access control. - function access() { + public function access() { return user_access('access user profiles'); } public function query() { - $this->ensure_my_table(); + $this->ensureMyTable(); $this->add_additional_fields(); } function render($values) { $value = $this->get_value($values, 'uid'); - return $this->render_link($this->sanitize_value($value), $values); + return $this->render_link($this->sanitizeValue($value), $values); } function render_link($data, $values) { diff --git a/lib/Views/user/Plugin/views/field/Name.php b/lib/Views/user/Plugin/views/field/Name.php index 754058ccc041b9c225183c4fec0a2e7ce2b1e245..3c76de4f2d952cbd65e95cad204a3e43ed0ab99a 100644 --- a/lib/Views/user/Plugin/views/field/Name.php +++ b/lib/Views/user/Plugin/views/field/Name.php @@ -25,7 +25,7 @@ class Name extends User { /** * Add uid in the query so we can test for anonymous if needed. */ - function init(&$view, &$data) { + public function init(&$view, &$data) { parent::init($view, $data); if (!empty($this->options['overwrite_anonymous']) || !empty($this->options['format_username'])) { $this->additional_fields['uid'] = 'uid'; diff --git a/lib/Views/user/Plugin/views/field/User.php b/lib/Views/user/Plugin/views/field/User.php index fcc11869deae7b333621759e7000e41f251717fc..641d773c722629d2e416fe2fbd78c7fc975ebeba 100644 --- a/lib/Views/user/Plugin/views/field/User.php +++ b/lib/Views/user/Plugin/views/field/User.php @@ -25,7 +25,7 @@ class User extends FieldPluginBase { /** * Override init function to provide generic option to link to user. */ - function init(&$view, &$data) { + public function init(&$view, &$data) { parent::init($view, $data); if (!empty($this->options['link_to_user'])) { $this->additional_fields['uid'] = 'uid'; @@ -61,7 +61,7 @@ function render_link($data, $values) { function render($values) { $value = $this->get_value($values); - return $this->render_link($this->sanitize_value($value), $values); + return $this->render_link($this->sanitizeValue($value), $values); } } diff --git a/lib/Views/user/Plugin/views/filter/Current.php b/lib/Views/user/Plugin/views/filter/Current.php index 28d9bcba2c5904ba6f96398c4034c5ce9f7cf1f0..c50ef9fa24da8e0079936dfc0584c04de263addb 100644 --- a/lib/Views/user/Plugin/views/filter/Current.php +++ b/lib/Views/user/Plugin/views/filter/Current.php @@ -28,7 +28,7 @@ public function construct() { } public function query() { - $this->ensure_my_table(); + $this->ensureMyTable(); $field = $this->table_alias . '.' . $this->real_field . ' '; $or = db_or(); diff --git a/lib/Views/user/Plugin/views/filter/Name.php b/lib/Views/user/Plugin/views/filter/Name.php index b85f390e083e69087b4c46117c4cb7dee9a7903f..857a1df72422ef1a8cfb7661a74ecbaa03e2e3dc 100644 --- a/lib/Views/user/Plugin/views/filter/Name.php +++ b/lib/Views/user/Plugin/views/filter/Name.php @@ -62,8 +62,8 @@ function value_validate($form, &$form_state) { } } - function accept_exposed_input($input) { - $rc = parent::accept_exposed_input($input); + public function acceptExposedInput($input) { + $rc = parent::acceptExposedInput($input); if ($rc) { // If we have previously validated input, override. @@ -75,7 +75,7 @@ function accept_exposed_input($input) { return $rc; } - function exposed_validate(&$form, &$form_state) { + public function validateExposed(&$form, &$form_state) { if (empty($this->options['exposed'])) { return; } @@ -151,7 +151,7 @@ function value_submit($form, &$form_state) { // Override to do nothing. function get_value_options() { } - function admin_summary() { + public function adminSummary() { // set up $this->value_options for the parent summary $this->value_options = array(); @@ -167,7 +167,7 @@ function admin_summary() { } } - return parent::admin_summary(); + return parent::adminSummary(); } } diff --git a/tests/views_test/lib/Drupal/views_test/Plugin/views/access/DynamicTest.php b/tests/views_test/lib/Drupal/views_test/Plugin/views/access/DynamicTest.php index a1886d4d1fc4687a85845d3dc1c6bd4bbfc794f0..746661570c94608a2de2047adb72eadc466a41df 100644 --- a/tests/views_test/lib/Drupal/views_test/Plugin/views/access/DynamicTest.php +++ b/tests/views_test/lib/Drupal/views_test/Plugin/views/access/DynamicTest.php @@ -29,7 +29,7 @@ protected function defineOptions() { return $options; } - function access($account) { + public function access($account) { return !empty($this->options['access']) && isset($this->view->args[0]) && $this->view->args[0] == variable_get('test_dynamic_access_argument1', NULL) && isset($this->view->args[1]) && $this->view->args[1] == variable_get('test_dynamic_access_argument2', NULL); } diff --git a/tests/views_test/lib/Drupal/views_test/Plugin/views/access/StaticTest.php b/tests/views_test/lib/Drupal/views_test/Plugin/views/access/StaticTest.php index fb98d2131a6b346285a702a7092f755448fac82c..61ea392e3940356e5b5eaabe61506dba1e1791d7 100644 --- a/tests/views_test/lib/Drupal/views_test/Plugin/views/access/StaticTest.php +++ b/tests/views_test/lib/Drupal/views_test/Plugin/views/access/StaticTest.php @@ -29,7 +29,7 @@ protected function defineOptions() { return $options; } - function access($account) { + public function access($account) { return !empty($this->options['access']); } diff --git a/views.api.php b/views.api.php index 7fb2c358774cbf9ea75d262f6ad7f680a2778864..7c537a3c08f6b73148322bd3d32ff2a02ddaf803 100644 --- a/views.api.php +++ b/views.api.php @@ -55,7 +55,7 @@ * - handler->init() * - Attach the handler to a view, and usually provides the options from the * display. - * - handler->pre_query() + * - handler->preQuery() * - Run prior to the query() stage to do early processing. * - handler->query() * - Do the bulk of the work this handler needs to do to add itself to the diff --git a/views.module b/views.module index 4f31fcc68c76d8ab90a32ae046e953c3dcb93abc..2c65e21823542fcfaf8a6e1debab13fd015d4c2a 100644 --- a/views.module +++ b/views.module @@ -2021,20 +2021,20 @@ function views_exposed_form($form, &$form_state) { // Go through each handler and let it generate its exposed widget. foreach ($view->display_handler->handlers as $type => $value) { foreach ($view->$type as $id => $handler) { - if ($handler->can_expose() && $handler->is_exposed()) { + if ($handler->canExpose() && $handler->isExposed()) { // Grouped exposed filters have their own forms. // Instead of render the standard exposed form, a new Select or // Radio form field is rendered with the available groups. // When an user choose an option the selected value is split // into the operator and value that the item represents. - if ($handler->is_a_group()) { + if ($handler->isAGroup()) { $handler->group_form($form, $form_state); $id = $handler->options['group_info']['identifier']; } else { - $handler->exposed_form($form, $form_state); + $handler->buildExposedForm($form, $form_state); } - if ($info = $handler->exposed_info()) { + if ($info = $handler->exposedInfo()) { $form['#info']["$type-$id"] = $info; } } @@ -2087,7 +2087,7 @@ function views_exposed_form_validate(&$form, &$form_state) { foreach (array('field', 'filter') as $type) { $handlers = &$form_state['view']->$type; foreach ($handlers as $key => $handler) { - $handlers[$key]->exposed_validate($form, $form_state); + $handlers[$key]->validateExposed($form, $form_state); } } $exposed_form_plugin = $form_state['exposed_form_plugin']; @@ -2101,7 +2101,7 @@ function views_exposed_form_submit(&$form, &$form_state) { foreach (array('field', 'filter') as $type) { $handlers = &$form_state['view']->$type; foreach ($handlers as $key => $info) { - $handlers[$key]->exposed_submit($form, $form_state); + $handlers[$key]->submitExposed($form, $form_state); } } $form_state['view']->exposed_data = $form_state['values']; diff --git a/views_ui.module b/views_ui.module index 7c273258dd27b29dcc37e589098478649f84829f..25d9d1c22e263f41ed422ecc052eb16b0a33e65e 100644 --- a/views_ui.module +++ b/views_ui.module @@ -485,7 +485,7 @@ function views_ui_view_preview_section_handler_links($view, $type, $title = FALS } foreach ($handlers as $id => $handler) { - $field_name = $handler->ui_name(TRUE); + $field_name = $handler->uiName(TRUE); $links[$type . '-edit-' . $id] = array( 'title' => t('Edit @section', array('@section' => $field_name)), 'href' => "admin/structure/views/nojs/config-item/$view->name/$display->id/$type/$id",