Commit 6488fe47 by Alexander Makarov

Better phpdoc for chained method calls

parent fceb2d6e
...@@ -168,7 +168,7 @@ class ActiveQuery extends Query ...@@ -168,7 +168,7 @@ class ActiveQuery extends Query
/** /**
* Sets the [[asArray]] property. * Sets the [[asArray]] property.
* @param boolean $value whether to return the query results in terms of arrays instead of Active Records. * @param boolean $value whether to return the query results in terms of arrays instead of Active Records.
* @return ActiveQuery the query object itself * @return static the query object itself
*/ */
public function asArray($value = true) public function asArray($value = true)
{ {
...@@ -196,7 +196,7 @@ class ActiveQuery extends Query ...@@ -196,7 +196,7 @@ class ActiveQuery extends Query
* ))->all(); * ))->all();
* ~~~ * ~~~
* *
* @return ActiveQuery the query object itself * @return static the query object itself
*/ */
public function with() public function with()
{ {
...@@ -223,12 +223,11 @@ class ActiveQuery extends Query ...@@ -223,12 +223,11 @@ class ActiveQuery extends Query
* } * }
* ~~~ * ~~~
* *
* @return ActiveQuery the query object itself * @return static the query object itself
*/ */
public function indexBy($column) public function indexBy($column)
{ {
$this->indexBy = $column; parent::indexBy($column);
return $this;
} }
private function createModels($rows) private function createModels($rows)
......
...@@ -66,7 +66,7 @@ class ActiveRelation extends ActiveQuery ...@@ -66,7 +66,7 @@ class ActiveRelation extends ActiveQuery
* @param string $relationName the relation name. This refers to a relation declared in [[primaryModel]]. * @param string $relationName the relation name. This refers to a relation declared in [[primaryModel]].
* @param callable $callable a PHP callback for customizing the relation associated with the pivot table. * @param callable $callable a PHP callback for customizing the relation associated with the pivot table.
* Its signature should be `function($query)`, where `$query` is the query to be customized. * Its signature should be `function($query)`, where `$query` is the query to be customized.
* @return ActiveRelation the relation object itself. * @return static the relation object itself.
*/ */
public function via($relationName, $callable = null) public function via($relationName, $callable = null)
{ {
...@@ -86,7 +86,7 @@ class ActiveRelation extends ActiveQuery ...@@ -86,7 +86,7 @@ class ActiveRelation extends ActiveQuery
* in the [[primaryModel]] table. * in the [[primaryModel]] table.
* @param callable $callable a PHP callback for customizing the relation associated with the pivot table. * @param callable $callable a PHP callback for customizing the relation associated with the pivot table.
* Its signature should be `function($query)`, where `$query` is the query to be customized. * Its signature should be `function($query)`, where `$query` is the query to be customized.
* @return ActiveRelation * @return static
*/ */
public function viaTable($tableName, $link, $callable = null) public function viaTable($tableName, $link, $callable = null)
{ {
......
...@@ -88,7 +88,7 @@ class Command extends \yii\base\Component ...@@ -88,7 +88,7 @@ class Command extends \yii\base\Component
* Specifies the SQL statement to be executed. * Specifies the SQL statement to be executed.
* The previous SQL execution (if any) will be cancelled, and [[params]] will be cleared as well. * The previous SQL execution (if any) will be cancelled, and [[params]] will be cleared as well.
* @param string $sql the SQL statement to be set. * @param string $sql the SQL statement to be set.
* @return Command this command instance * @return static this command instance
*/ */
public function setSql($sql) public function setSql($sql)
{ {
...@@ -174,7 +174,7 @@ class Command extends \yii\base\Component ...@@ -174,7 +174,7 @@ class Command extends \yii\base\Component
* @param integer $dataType SQL data type of the parameter. If null, the type is determined by the PHP type of the value. * @param integer $dataType SQL data type of the parameter. If null, the type is determined by the PHP type of the value.
* @param integer $length length of the data type * @param integer $length length of the data type
* @param mixed $driverOptions the driver-specific options * @param mixed $driverOptions the driver-specific options
* @return Command the current command being executed * @return static the current command being executed
* @see http://www.php.net/manual/en/function.PDOStatement-bindParam.php * @see http://www.php.net/manual/en/function.PDOStatement-bindParam.php
*/ */
public function bindParam($name, &$value, $dataType = null, $length = null, $driverOptions = null) public function bindParam($name, &$value, $dataType = null, $length = null, $driverOptions = null)
...@@ -201,7 +201,7 @@ class Command extends \yii\base\Component ...@@ -201,7 +201,7 @@ class Command extends \yii\base\Component
* placeholders, this will be the 1-indexed position of the parameter. * placeholders, this will be the 1-indexed position of the parameter.
* @param mixed $value The value to bind to the parameter * @param mixed $value The value to bind to the parameter
* @param integer $dataType SQL data type of the parameter. If null, the type is determined by the PHP type of the value. * @param integer $dataType SQL data type of the parameter. If null, the type is determined by the PHP type of the value.
* @return Command the current command being executed * @return static the current command being executed
* @see http://www.php.net/manual/en/function.PDOStatement-bindValue.php * @see http://www.php.net/manual/en/function.PDOStatement-bindValue.php
*/ */
public function bindValue($name, $value, $dataType = null) public function bindValue($name, $value, $dataType = null)
...@@ -225,7 +225,7 @@ class Command extends \yii\base\Component ...@@ -225,7 +225,7 @@ class Command extends \yii\base\Component
* e.g. `array(':name' => 'John', ':age' => 25)`. By default, the PDO type of each value is determined * e.g. `array(':name' => 'John', ':age' => 25)`. By default, the PDO type of each value is determined
* by its PHP type. You may explicitly specify the PDO type by using an array: `array(value, type)`, * by its PHP type. You may explicitly specify the PDO type by using an array: `array(value, type)`,
* e.g. `array(':name' => 'John', ':profile' => array($profile, \PDO::PARAM_LOB))`. * e.g. `array(':name' => 'John', ':profile' => array($profile, \PDO::PARAM_LOB))`.
* @return Command the current command being executed * @return static the current command being executed
*/ */
public function bindValues($values) public function bindValues($values)
{ {
......
...@@ -166,7 +166,7 @@ class Query extends Component ...@@ -166,7 +166,7 @@ class Query extends Component
* } * }
* ~~~ * ~~~
* *
* @return Query the query object itself * @return static the query object itself
*/ */
public function indexBy($column) public function indexBy($column)
{ {
...@@ -325,7 +325,7 @@ class Query extends Component ...@@ -325,7 +325,7 @@ class Query extends Component
* (which means the column contains a DB expression). * (which means the column contains a DB expression).
* @param string $option additional option that should be appended to the 'SELECT' keyword. For example, * @param string $option additional option that should be appended to the 'SELECT' keyword. For example,
* in MySQL, the option 'SQL_CALC_FOUND_ROWS' can be used. * in MySQL, the option 'SQL_CALC_FOUND_ROWS' can be used.
* @return Query the query object itself * @return static the query object itself
*/ */
public function select($columns, $option = null) public function select($columns, $option = null)
{ {
...@@ -340,7 +340,7 @@ class Query extends Component ...@@ -340,7 +340,7 @@ class Query extends Component
/** /**
* Sets the value indicating whether to SELECT DISTINCT or not. * Sets the value indicating whether to SELECT DISTINCT or not.
* @param bool $value whether to SELECT DISTINCT or not. * @param bool $value whether to SELECT DISTINCT or not.
* @return Query the query object itself * @return static the query object itself
*/ */
public function distinct($value = true) public function distinct($value = true)
{ {
...@@ -355,7 +355,7 @@ class Query extends Component ...@@ -355,7 +355,7 @@ class Query extends Component
* Table names can contain schema prefixes (e.g. `'public.tbl_user'`) and/or table aliases (e.g. `'tbl_user u'`). * Table names can contain schema prefixes (e.g. `'public.tbl_user'`) and/or table aliases (e.g. `'tbl_user u'`).
* The method will automatically quote the table names unless it contains some parenthesis * The method will automatically quote the table names unless it contains some parenthesis
* (which means the table is given as a sub-query or DB expression). * (which means the table is given as a sub-query or DB expression).
* @return Query the query object itself * @return static the query object itself
*/ */
public function from($tables) public function from($tables)
{ {
...@@ -431,7 +431,7 @@ class Query extends Component ...@@ -431,7 +431,7 @@ class Query extends Component
* *
* @param string|array $condition the conditions that should be put in the WHERE part. * @param string|array $condition the conditions that should be put in the WHERE part.
* @param array $params the parameters (name => value) to be bound to the query. * @param array $params the parameters (name => value) to be bound to the query.
* @return Query the query object itself * @return static the query object itself
* @see andWhere() * @see andWhere()
* @see orWhere() * @see orWhere()
*/ */
...@@ -448,7 +448,7 @@ class Query extends Component ...@@ -448,7 +448,7 @@ class Query extends Component
* @param string|array $condition the new WHERE condition. Please refer to [[where()]] * @param string|array $condition the new WHERE condition. Please refer to [[where()]]
* on how to specify this parameter. * on how to specify this parameter.
* @param array $params the parameters (name => value) to be bound to the query. * @param array $params the parameters (name => value) to be bound to the query.
* @return Query the query object itself * @return static the query object itself
* @see where() * @see where()
* @see orWhere() * @see orWhere()
*/ */
...@@ -469,7 +469,7 @@ class Query extends Component ...@@ -469,7 +469,7 @@ class Query extends Component
* @param string|array $condition the new WHERE condition. Please refer to [[where()]] * @param string|array $condition the new WHERE condition. Please refer to [[where()]]
* on how to specify this parameter. * on how to specify this parameter.
* @param array $params the parameters (name => value) to be bound to the query. * @param array $params the parameters (name => value) to be bound to the query.
* @return Query the query object itself * @return static the query object itself
* @see where() * @see where()
* @see andWhere() * @see andWhere()
*/ */
...@@ -560,7 +560,7 @@ class Query extends Component ...@@ -560,7 +560,7 @@ class Query extends Component
* Columns can be specified in either a string (e.g. "id, name") or an array (e.g. array('id', 'name')). * Columns can be specified in either a string (e.g. "id, name") or an array (e.g. array('id', 'name')).
* The method will automatically quote the column names unless a column contains some parenthesis * The method will automatically quote the column names unless a column contains some parenthesis
* (which means the column contains a DB expression). * (which means the column contains a DB expression).
* @return Query the query object itself * @return static the query object itself
* @see addGroupBy() * @see addGroupBy()
*/ */
public function groupBy($columns) public function groupBy($columns)
...@@ -578,7 +578,7 @@ class Query extends Component ...@@ -578,7 +578,7 @@ class Query extends Component
* Columns can be specified in either a string (e.g. "id, name") or an array (e.g. array('id', 'name')). * Columns can be specified in either a string (e.g. "id, name") or an array (e.g. array('id', 'name')).
* The method will automatically quote the column names unless a column contains some parenthesis * The method will automatically quote the column names unless a column contains some parenthesis
* (which means the column contains a DB expression). * (which means the column contains a DB expression).
* @return Query the query object itself * @return static the query object itself
* @see groupBy() * @see groupBy()
*/ */
public function addGroupBy($columns) public function addGroupBy($columns)
...@@ -599,7 +599,7 @@ class Query extends Component ...@@ -599,7 +599,7 @@ class Query extends Component
* @param string|array $condition the conditions to be put after HAVING. * @param string|array $condition the conditions to be put after HAVING.
* Please refer to [[where()]] on how to specify this parameter. * Please refer to [[where()]] on how to specify this parameter.
* @param array $params the parameters (name => value) to be bound to the query. * @param array $params the parameters (name => value) to be bound to the query.
* @return Query the query object itself * @return static the query object itself
* @see andHaving() * @see andHaving()
* @see orHaving() * @see orHaving()
*/ */
...@@ -616,7 +616,7 @@ class Query extends Component ...@@ -616,7 +616,7 @@ class Query extends Component
* @param string|array $condition the new HAVING condition. Please refer to [[where()]] * @param string|array $condition the new HAVING condition. Please refer to [[where()]]
* on how to specify this parameter. * on how to specify this parameter.
* @param array $params the parameters (name => value) to be bound to the query. * @param array $params the parameters (name => value) to be bound to the query.
* @return Query the query object itself * @return static the query object itself
* @see having() * @see having()
* @see orHaving() * @see orHaving()
*/ */
...@@ -637,7 +637,7 @@ class Query extends Component ...@@ -637,7 +637,7 @@ class Query extends Component
* @param string|array $condition the new HAVING condition. Please refer to [[where()]] * @param string|array $condition the new HAVING condition. Please refer to [[where()]]
* on how to specify this parameter. * on how to specify this parameter.
* @param array $params the parameters (name => value) to be bound to the query. * @param array $params the parameters (name => value) to be bound to the query.
* @return Query the query object itself * @return static the query object itself
* @see having() * @see having()
* @see andHaving() * @see andHaving()
*/ */
...@@ -659,7 +659,7 @@ class Query extends Component ...@@ -659,7 +659,7 @@ class Query extends Component
* (e.g. `array('id' => Query::SORT_ASC, 'name' => Query::SORT_DESC)`). * (e.g. `array('id' => Query::SORT_ASC, 'name' => Query::SORT_DESC)`).
* The method will automatically quote the column names unless a column contains some parenthesis * The method will automatically quote the column names unless a column contains some parenthesis
* (which means the column contains a DB expression). * (which means the column contains a DB expression).
* @return Query the query object itself * @return static the query object itself
* @see addOrderBy() * @see addOrderBy()
*/ */
public function orderBy($columns) public function orderBy($columns)
...@@ -675,7 +675,7 @@ class Query extends Component ...@@ -675,7 +675,7 @@ class Query extends Component
* (e.g. `array('id' => Query::SORT_ASC, 'name' => Query::SORT_DESC)`). * (e.g. `array('id' => Query::SORT_ASC, 'name' => Query::SORT_DESC)`).
* The method will automatically quote the column names unless a column contains some parenthesis * The method will automatically quote the column names unless a column contains some parenthesis
* (which means the column contains a DB expression). * (which means the column contains a DB expression).
* @return Query the query object itself * @return static the query object itself
* @see orderBy() * @see orderBy()
*/ */
public function addOrderBy($columns) public function addOrderBy($columns)
...@@ -710,7 +710,7 @@ class Query extends Component ...@@ -710,7 +710,7 @@ class Query extends Component
/** /**
* Sets the LIMIT part of the query. * Sets the LIMIT part of the query.
* @param integer $limit the limit. Use null or negative value to disable limit. * @param integer $limit the limit. Use null or negative value to disable limit.
* @return Query the query object itself * @return static the query object itself
*/ */
public function limit($limit) public function limit($limit)
{ {
...@@ -721,7 +721,7 @@ class Query extends Component ...@@ -721,7 +721,7 @@ class Query extends Component
/** /**
* Sets the OFFSET part of the query. * Sets the OFFSET part of the query.
* @param integer $offset the offset. Use null or negative value to disable offset. * @param integer $offset the offset. Use null or negative value to disable offset.
* @return Query the query object itself * @return static the query object itself
*/ */
public function offset($offset) public function offset($offset)
{ {
...@@ -732,7 +732,7 @@ class Query extends Component ...@@ -732,7 +732,7 @@ class Query extends Component
/** /**
* Appends a SQL statement using UNION operator. * Appends a SQL statement using UNION operator.
* @param string|Query $sql the SQL statement to be appended using UNION * @param string|Query $sql the SQL statement to be appended using UNION
* @return Query the query object itself * @return static the query object itself
*/ */
public function union($sql) public function union($sql)
{ {
...@@ -744,7 +744,7 @@ class Query extends Component ...@@ -744,7 +744,7 @@ class Query extends Component
* Sets the parameters to be bound to the query. * Sets the parameters to be bound to the query.
* @param array $params list of query parameter values indexed by parameter placeholders. * @param array $params list of query parameter values indexed by parameter placeholders.
* For example, `array(':name' => 'Dan', ':age' => 31)`. * For example, `array(':name' => 'Dan', ':age' => 31)`.
* @return Query the query object itself * @return static the query object itself
* @see addParams() * @see addParams()
*/ */
public function params($params) public function params($params)
...@@ -757,7 +757,7 @@ class Query extends Component ...@@ -757,7 +757,7 @@ class Query extends Component
* Adds additional parameters to be bound to the query. * Adds additional parameters to be bound to the query.
* @param array $params list of query parameter values indexed by parameter placeholders. * @param array $params list of query parameter values indexed by parameter placeholders.
* For example, `array(':name' => 'Dan', ':age' => 31)`. * For example, `array(':name' => 'Dan', ':age' => 31)`.
* @return Query the query object itself * @return static the query object itself
* @see params() * @see params()
*/ */
public function addParams($params) public function addParams($params)
......
...@@ -32,6 +32,10 @@ class ActiveField extends \yii\widgets\ActiveField ...@@ -32,6 +32,10 @@ class ActiveField extends \yii\widgets\ActiveField
} }
} }
/**
* Makes filed remember its value between page reloads
* @return static the field object itself
*/
public function sticky() public function sticky()
{ {
$this->options['class'] .= ' sticky'; $this->options['class'] .= ' sticky';
......
...@@ -63,7 +63,7 @@ class YiiRequirementChecker ...@@ -63,7 +63,7 @@ class YiiRequirementChecker
* @param array|string $requirements requirements to be checked. * @param array|string $requirements requirements to be checked.
* If an array, it is treated as the set of requirements; * If an array, it is treated as the set of requirements;
* If a string, it is treated as the path of the file, which contains the requirements; * If a string, it is treated as the path of the file, which contains the requirements;
* @return YiiRequirementChecker self instance. * @return static self instance.
*/ */
function check($requirements) function check($requirements)
{ {
......
...@@ -83,7 +83,7 @@ class HeaderCollection extends Object implements \IteratorAggregate, \ArrayAcces ...@@ -83,7 +83,7 @@ class HeaderCollection extends Object implements \IteratorAggregate, \ArrayAcces
* If there is already a header with the same name, it will be replaced. * If there is already a header with the same name, it will be replaced.
* @param string $name the name of the header * @param string $name the name of the header
* @param string $value the value of the header * @param string $value the value of the header
* @return HeaderCollection the collection object itself * @return static the collection object itself
*/ */
public function set($name, $value = '') public function set($name, $value = '')
{ {
...@@ -98,7 +98,7 @@ class HeaderCollection extends Object implements \IteratorAggregate, \ArrayAcces ...@@ -98,7 +98,7 @@ class HeaderCollection extends Object implements \IteratorAggregate, \ArrayAcces
* be appended to it instead of replacing it. * be appended to it instead of replacing it.
* @param string $name the name of the header * @param string $name the name of the header
* @param string $value the value of the header * @param string $value the value of the header
* @return HeaderCollection the collection object itself * @return static the collection object itself
*/ */
public function add($name, $value) public function add($name, $value)
{ {
...@@ -112,7 +112,7 @@ class HeaderCollection extends Object implements \IteratorAggregate, \ArrayAcces ...@@ -112,7 +112,7 @@ class HeaderCollection extends Object implements \IteratorAggregate, \ArrayAcces
* If there is already a header with the same name, the new one will be ignored. * If there is already a header with the same name, the new one will be ignored.
* @param string $name the name of the header * @param string $name the name of the header
* @param string $value the value of the header * @param string $value the value of the header
* @return HeaderCollection the collection object itself * @return static the collection object itself
*/ */
public function setDefault($name, $value) public function setDefault($name, $value)
{ {
......
...@@ -605,7 +605,7 @@ class Response extends \yii\base\Response ...@@ -605,7 +605,7 @@ class Response extends \yii\base\Response
* @param integer $statusCode the HTTP status code. If null, it will use 302. * @param integer $statusCode the HTTP status code. If null, it will use 302.
* See [[http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html]] * See [[http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html]]
* for details about HTTP status code * for details about HTTP status code
* @return Response the response object itself * @return static the response object itself
*/ */
public function redirect($url, $statusCode = null) public function redirect($url, $statusCode = null)
{ {
......
...@@ -221,7 +221,7 @@ class ActiveField extends Component ...@@ -221,7 +221,7 @@ class ActiveField extends Component
* @param array $options the tag options in terms of name-value pairs. It will be merged with [[labelOptions]]. * @param array $options the tag options in terms of name-value pairs. It will be merged with [[labelOptions]].
* The options will be rendered as the attributes of the resulting tag. The values will be HTML-encoded * The options will be rendered as the attributes of the resulting tag. The values will be HTML-encoded
* using [[Html::encode()]]. If a value is null, the corresponding attribute will not be rendered. * using [[Html::encode()]]. If a value is null, the corresponding attribute will not be rendered.
* @return ActiveField the field object itself * @return static the field object itself
*/ */
public function label($label = null, $options = array()) public function label($label = null, $options = array())
{ {
...@@ -244,7 +244,7 @@ class ActiveField extends Component ...@@ -244,7 +244,7 @@ class ActiveField extends Component
* *
* - tag: this specifies the tag name. If not set, "div" will be used. * - tag: this specifies the tag name. If not set, "div" will be used.
* *
* @return ActiveField the field object itself * @return static the field object itself
*/ */
public function error($options = array()) public function error($options = array())
{ {
...@@ -263,7 +263,7 @@ class ActiveField extends Component ...@@ -263,7 +263,7 @@ class ActiveField extends Component
* *
* - tag: this specifies the tag name. If not set, "div" will be used. * - tag: this specifies the tag name. If not set, "div" will be used.
* *
* @return ActiveField the field object itself * @return static the field object itself
*/ */
public function hint($content, $options = array()) public function hint($content, $options = array())
{ {
...@@ -278,7 +278,7 @@ class ActiveField extends Component ...@@ -278,7 +278,7 @@ class ActiveField extends Component
* @param string $type the input type (e.g. 'text', 'password') * @param string $type the input type (e.g. 'text', 'password')
* @param array $options the tag options in terms of name-value pairs. These will be rendered as * @param array $options the tag options in terms of name-value pairs. These will be rendered as
* the attributes of the resulting tag. The values will be HTML-encoded using [[Html::encode()]]. * the attributes of the resulting tag. The values will be HTML-encoded using [[Html::encode()]].
* @return ActiveField the field object itself * @return static the field object itself
*/ */
public function input($type, $options = array()) public function input($type, $options = array())
{ {
...@@ -293,7 +293,7 @@ class ActiveField extends Component ...@@ -293,7 +293,7 @@ class ActiveField extends Component
* unless they are explicitly specified in `$options`. * unless they are explicitly specified in `$options`.
* @param array $options the tag options in terms of name-value pairs. These will be rendered as * @param array $options the tag options in terms of name-value pairs. These will be rendered as
* the attributes of the resulting tag. The values will be HTML-encoded using [[Html::encode()]]. * the attributes of the resulting tag. The values will be HTML-encoded using [[Html::encode()]].
* @return ActiveField the field object itself * @return static the field object itself
*/ */
public function textInput($options = array()) public function textInput($options = array())
{ {
...@@ -308,7 +308,7 @@ class ActiveField extends Component ...@@ -308,7 +308,7 @@ class ActiveField extends Component
* unless they are explicitly specified in `$options`. * unless they are explicitly specified in `$options`.
* @param array $options the tag options in terms of name-value pairs. These will be rendered as * @param array $options the tag options in terms of name-value pairs. These will be rendered as
* the attributes of the resulting tag. The values will be HTML-encoded using [[Html::encode()]]. * the attributes of the resulting tag. The values will be HTML-encoded using [[Html::encode()]].
* @return ActiveField the field object itself * @return static the field object itself
*/ */
public function passwordInput($options = array()) public function passwordInput($options = array())
{ {
...@@ -323,7 +323,7 @@ class ActiveField extends Component ...@@ -323,7 +323,7 @@ class ActiveField extends Component
* unless they are explicitly specified in `$options`. * unless they are explicitly specified in `$options`.
* @param array $options the tag options in terms of name-value pairs. These will be rendered as * @param array $options the tag options in terms of name-value pairs. These will be rendered as
* the attributes of the resulting tag. The values will be HTML-encoded using [[Html::encode()]]. * the attributes of the resulting tag. The values will be HTML-encoded using [[Html::encode()]].
* @return ActiveField the field object itself * @return static the field object itself
*/ */
public function fileInput($options = array()) public function fileInput($options = array())
{ {
...@@ -339,7 +339,7 @@ class ActiveField extends Component ...@@ -339,7 +339,7 @@ class ActiveField extends Component
* The model attribute value will be used as the content in the textarea. * The model attribute value will be used as the content in the textarea.
* @param array $options the tag options in terms of name-value pairs. These will be rendered as * @param array $options the tag options in terms of name-value pairs. These will be rendered as
* the attributes of the resulting tag. The values will be HTML-encoded using [[Html::encode()]]. * the attributes of the resulting tag. The values will be HTML-encoded using [[Html::encode()]].
* @return ActiveField the field object itself * @return static the field object itself
*/ */
public function textarea($options = array()) public function textarea($options = array())
{ {
...@@ -367,7 +367,7 @@ class ActiveField extends Component ...@@ -367,7 +367,7 @@ class ActiveField extends Component
* @param boolean $enclosedByLabel whether to enclose the radio within the label. * @param boolean $enclosedByLabel whether to enclose the radio within the label.
* If true, the method will still use [[template]] to layout the checkbox and the error message * If true, the method will still use [[template]] to layout the checkbox and the error message
* except that the radio is enclosed by the label tag. * except that the radio is enclosed by the label tag.
* @return ActiveField the field object itself * @return static the field object itself
*/ */
public function radio($options = array(), $enclosedByLabel = true) public function radio($options = array(), $enclosedByLabel = true)
{ {
...@@ -402,7 +402,7 @@ class ActiveField extends Component ...@@ -402,7 +402,7 @@ class ActiveField extends Component
* @param boolean $enclosedByLabel whether to enclose the checkbox within the label. * @param boolean $enclosedByLabel whether to enclose the checkbox within the label.
* If true, the method will still use [[template]] to layout the checkbox and the error message * If true, the method will still use [[template]] to layout the checkbox and the error message
* except that the checkbox is enclosed by the label tag. * except that the checkbox is enclosed by the label tag.
* @return ActiveField the field object itself * @return static the field object itself
*/ */
public function checkbox($options = array(), $enclosedByLabel = true) public function checkbox($options = array(), $enclosedByLabel = true)
{ {
...@@ -448,7 +448,7 @@ class ActiveField extends Component ...@@ -448,7 +448,7 @@ class ActiveField extends Component
* The rest of the options will be rendered as the attributes of the resulting tag. The values will * The rest of the options will be rendered as the attributes of the resulting tag. The values will
* be HTML-encoded using [[Html::encode()]]. If a value is null, the corresponding attribute will not be rendered. * be HTML-encoded using [[Html::encode()]]. If a value is null, the corresponding attribute will not be rendered.
* *
* @return ActiveField the field object itself * @return static the field object itself
*/ */
public function dropDownList($items, $options = array()) public function dropDownList($items, $options = array())
{ {
...@@ -490,7 +490,7 @@ class ActiveField extends Component ...@@ -490,7 +490,7 @@ class ActiveField extends Component
* The rest of the options will be rendered as the attributes of the resulting tag. The values will * The rest of the options will be rendered as the attributes of the resulting tag. The values will
* be HTML-encoded using [[Html::encode()]]. If a value is null, the corresponding attribute will not be rendered. * be HTML-encoded using [[Html::encode()]]. If a value is null, the corresponding attribute will not be rendered.
* *
* @return ActiveField the field object itself * @return static the field object itself
*/ */
public function listBox($items, $options = array()) public function listBox($items, $options = array())
{ {
...@@ -522,7 +522,7 @@ class ActiveField extends Component ...@@ -522,7 +522,7 @@ class ActiveField extends Component
* where $index is the zero-based index of the checkbox in the whole list; $label * where $index is the zero-based index of the checkbox in the whole list; $label
* is the label for the checkbox; and $name, $value and $checked represent the name, * is the label for the checkbox; and $name, $value and $checked represent the name,
* value and the checked status of the checkbox input. * value and the checked status of the checkbox input.
* @return ActiveField the field object itself * @return static the field object itself
*/ */
public function checkboxList($items, $options = array()) public function checkboxList($items, $options = array())
{ {
...@@ -552,7 +552,7 @@ class ActiveField extends Component ...@@ -552,7 +552,7 @@ class ActiveField extends Component
* where $index is the zero-based index of the radio button in the whole list; $label * where $index is the zero-based index of the radio button in the whole list; $label
* is the label for the radio button; and $name, $value and $checked represent the name, * is the label for the radio button; and $name, $value and $checked represent the name,
* value and the checked status of the radio button input. * value and the checked status of the radio button input.
* @return ActiveField the field object itself * @return static the field object itself
*/ */
public function radioList($items, $options = array()) public function radioList($items, $options = array())
{ {
...@@ -571,7 +571,7 @@ class ActiveField extends Component ...@@ -571,7 +571,7 @@ class ActiveField extends Component
* *
* @param string $class the widget class name * @param string $class the widget class name
* @param array $config name-value pairs that will be used to initialize the widget * @param array $config name-value pairs that will be used to initialize the widget
* @return ActiveField the field object itself * @return static the field object itself
*/ */
public function widget($class, $config = array()) public function widget($class, $config = array())
{ {
......
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