mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Renaming Helper::__name to Helper::_name for proper access level for extension overloading and callback.
This commit is contained in:
parent
0b2fc5b35f
commit
0049c9ad81
2 changed files with 7 additions and 5 deletions
|
@ -578,8 +578,9 @@ class Helper extends Overloadable {
|
|||
* @param array $options
|
||||
* @param string $key
|
||||
* @return array
|
||||
* @access protected
|
||||
*/
|
||||
function __name($options = array(), $field = null, $key = 'name') {
|
||||
function _name($options = array(), $field = null, $key = 'name') {
|
||||
$view =& ClassRegistry::getObject('view');
|
||||
if ($options === null) {
|
||||
$options = array();
|
||||
|
@ -689,7 +690,7 @@ class Helper extends Overloadable {
|
|||
$this->setEntity($field);
|
||||
}
|
||||
$options = (array)$options;
|
||||
$options = $this->__name($options);
|
||||
$options = $this->_name($options);
|
||||
$options = $this->value($options);
|
||||
$options = $this->domId($options);
|
||||
if ($this->tagIsInvalid()) {
|
||||
|
|
|
@ -1751,8 +1751,9 @@ class FormHelper extends AppHelper {
|
|||
* @param array $options
|
||||
* @param string $key
|
||||
* @return array
|
||||
* @access protected
|
||||
*/
|
||||
function __name($options = array(), $field = null, $key = 'name') {
|
||||
function _name($options = array(), $field = null, $key = 'name') {
|
||||
if ($this->requestType == 'get') {
|
||||
if ($options === null) {
|
||||
$options = array();
|
||||
|
@ -1777,7 +1778,7 @@ class FormHelper extends AppHelper {
|
|||
return $name;
|
||||
}
|
||||
}
|
||||
return parent::__name($options, $field, $key);
|
||||
return parent::_name($options, $field, $key);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1846,7 +1847,7 @@ class FormHelper extends AppHelper {
|
|||
$label['class'] = 'selected';
|
||||
}
|
||||
|
||||
list($name) = array_values($this->__name());
|
||||
list($name) = array_values($this->_name());
|
||||
|
||||
if (empty($attributes['class'])) {
|
||||
$attributes['class'] = 'checkbox';
|
||||
|
|
Loading…
Reference in a new issue