Commit 821dc67d authored by alexpott's avatar alexpott

Issue #2002442 by baldwinlouie, sillygwailo, jibran: Rename Views method...

Issue #2002442 by baldwinlouie, sillygwailo, jibran: Rename Views method default_actions() to defaultActions().
parent 167810ff
......@@ -37,17 +37,17 @@ function title() {
return check_plain($title);
}
function default_actions($which = NULL) {
protected function defaultActions($which = NULL) {
// Disallow summary views on this argument.
if (!$which) {
$actions = parent::default_actions();
$actions = parent::defaultActions();
unset($actions['summary asc']);
unset($actions['summary desc']);
return $actions;
}
if ($which != 'summary asc' && $which != 'summary desc') {
return parent::default_actions($which);
return parent::defaultActions($which);
}
}
......
......@@ -78,16 +78,16 @@ public function setBreadcrumb(&$breadcrumb) {
}
/**
* Override default_actions() to remove summary actions.
* Override defaultActions() to remove summary actions.
*/
function default_actions($which = NULL) {
protected function defaultActions($which = NULL) {
if ($which) {
if (in_array($which, array('ignore', 'not found', 'empty', 'default'))) {
return parent::default_actions($which);
return parent::defaultActions($which);
}
return;
}
$actions = parent::default_actions();
$actions = parent::defaultActions();
unset($actions['summary asc']);
unset($actions['summary desc']);
unset($actions['summary asc by count']);
......
......@@ -92,7 +92,7 @@ public function setBreadcrumb(&$breadcrumb) { }
* @return TRUE/FALSE
*/
public function usesBreadcrumb() {
$info = $this->default_actions($this->options['default_action']);
$info = $this->defaultActions($this->options['default_action']);
return !empty($info['breadcrumb']);
}
......@@ -117,8 +117,8 @@ public function exceptionTitle() {
* @return TRUE/FALSE
*/
public function needsStylePlugin() {
$info = $this->default_actions($this->options['default_action']);
$validate_info = $this->default_actions($this->options['validate']['fail']);
$info = $this->defaultActions($this->options['default_action']);
$validate_info = $this->defaultActions($this->options['validate']['fail']);
return !empty($info['style plugin']) || !empty($validate_info['style plugin']);
}
......@@ -223,7 +223,7 @@ public function buildOptionsForm(&$form, &$form_state) {
);
$options = array();
$defaults = $this->default_actions();
$defaults = $this->defaultActions();
$validate_options = array();
foreach ($defaults as $id => $info) {
$options[$id] = $info['title'];
......@@ -440,7 +440,7 @@ public function submitOptionsForm(&$form, &$form_state) {
*
* Override this method to provide additional (or fewer) default behaviors.
*/
function default_actions($which = NULL) {
protected function defaultActions($which = NULL) {
$defaults = array(
'ignore' => array(
'title' => t('Display all results for the specified field'),
......@@ -653,7 +653,7 @@ public function defaultSummaryForm(&$form, &$form_state) {
*/
function default_action($info = NULL) {
if (!isset($info)) {
$info = $this->default_actions($this->options['default_action']);
$info = $this->defaultActions($this->options['default_action']);
}
if (!$info) {
......@@ -672,7 +672,7 @@ function default_action($info = NULL) {
* How to act if validation failes
*/
public function validateFail() {
$info = $this->default_actions($this->options['validate']['fail']);
$info = $this->defaultActions($this->options['validate']['fail']);
return $this->default_action($info);
}
/**
......@@ -734,7 +734,7 @@ function default_default() {
* Determine if the argument is set to provide a default argument.
*/
function hasDefaultArgument() {
$info = $this->default_actions($this->options['default_action']);
$info = $this->defaultActions($this->options['default_action']);
return !empty($info['has default argument']);
}
......@@ -961,7 +961,7 @@ public function validateArgument($arg) {
* then validation cannot actually fail.
*/
function validate_argument($arg) {
$validate_info = $this->default_actions($this->options['validate']['fail']);
$validate_info = $this->defaultActions($this->options['validate']['fail']);
if (empty($validate_info['hard fail'])) {
return TRUE;
}
......@@ -970,7 +970,7 @@ function validate_argument($arg) {
// If the validator has changed the validate fail condition to a
// soft fail, deal with that:
$validate_info = $this->default_actions($this->options['validate']['fail']);
$validate_info = $this->defaultActions($this->options['validate']['fail']);
if (empty($validate_info['hard fail'])) {
return TRUE;
}
......
......@@ -42,17 +42,17 @@ public function buildOptionsForm(&$form, &$form_state) {
}
/**
* Override default_actions() to remove actions that don't
* Override defaultActions() to remove actions that don't
* make sense for a null argument.
*/
function default_actions($which = NULL) {
protected function defaultActions($which = NULL) {
if ($which) {
if (in_array($which, array('ignore', 'not found', 'empty', 'default'))) {
return parent::default_actions($which);
return parent::defaultActions($which);
}
return;
}
$actions = parent::default_actions();
$actions = parent::defaultActions();
unset($actions['summary asc']);
unset($actions['summary desc']);
return $actions;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment