Browse Source

#12074: Updated `yii\widgets\ActiveField::hint()` method signature to match `label()`

tags/3.0.0-alpha1
Alexander Makarov 8 years ago
parent
commit
2722b3a7cf
  1. 1
      framework/CHANGELOG.md
  2. 1
      framework/UPGRADE.md
  3. 4
      framework/widgets/ActiveField.php

1
framework/CHANGELOG.md

@ -8,6 +8,7 @@ Yii Framework 2 Change Log
- Chg #10771: Consistent behavior of `run()` method in all framework widgets. All return the result now for better extensibility (pkirill99, cebe)
- Chg #11397: Minimum required version of PHP is 5.5.0 now (samdark)
- Chg: Removed `yii\base\Object::className()` in favor of native PHP syntax `::class`, which does not trigger autoloading (cebe)
- Chg #12074: Updated `yii\widgets\ActiveField::hint()` method signature to match `label()` (PowerGamer1, samdark)
2.0.10 under development
------------------------

1
framework/UPGRADE.md

@ -32,6 +32,7 @@ Upgrade to Yii 2.1.0
`yii\db\QueryBuilderbuild::buildGroupBy($columns)` -> `buildGroupBy($columns, &$params)`
`yii\db\QueryBuilderbuild::buildOrderByAndLimit($sql, $orderBy, $limit, $offset)` -> `buildOrderByAndLimit($sql, $orderBy, $limit, $offset, &$params)`
`yii\widgets\ActiveField::hint($content = null, $options = [])`
Upgrade from Yii 2.0.8
----------------------

4
framework/widgets/ActiveField.php

@ -199,7 +199,7 @@ class ActiveField extends Component
$this->error();
}
if (!isset($this->parts['{hint}'])) {
$this->hint(null);
$this->hint();
}
$content = strtr($this->template, $this->parts);
} elseif (!is_string($content)) {
@ -317,7 +317,7 @@ class ActiveField extends Component
*
* @return $this the field object itself
*/
public function hint($content, $options = [])
public function hint($content = null, $options = [])
{
if ($content === false) {
$this->parts['{hint}'] = '';

Loading…
Cancel
Save