validators\CompareValidator validateValue()

validateValue() protected method Validates a value. A validator class can implement this method to support data validation out of the context of a data model. protected array|null validateValue ( $value )$value mixed The data value to be validated. return array|null The error message and the parameters to be inserted into the error message. Null should be returned if the data is valid. throws yii\base\NotSupportedException if the validator does not supporting data validation withou

db\QueryBuilder insert()

insert() public method Creates an INSERT SQL statement. For example, $sql = $queryBuilder->insert('user', [ 'name' => 'Sam', 'age' => 30, ], $params); The method will properly escape the table and column names. public string insert ( $table, $columns, &$params )$table string The table that new rows will be inserted into. $columns array The column data (name => value) to be inserted into the table. $params array The binding parameters that will be generated by

Data widgets

DetailView ListView GridView Further reading Yii provides a set of widgets that can be used to display data. While the DetailView widget can be used to display data for a single record, ListView and GridView can be used to display a list or table of data records providing features like pagination, sorting and filtering. DetailView The DetailView widget displays the details of a single data model. It is best used for displaying a model in a regular format (e.g. each model attribute is dis

helpers\BaseStringHelper truncateWords()

truncateWords() public static method Truncates a string to the number of words specified. public static string truncateWords ( $string, $count, $suffix = '...', $asHtml = false )$string string The string to truncate. $count integer How many words from original string to include into truncated string. $suffix string String to append to the end of truncated string. $asHtml boolean Whether to treat the string being truncated as HTML and preserve proper HTML tags. This parameter is ava

gii\generators\model\Generator $generateLabelsFromComments

$generateLabelsFromComments public property public $generateLabelsFromComments = false

web\DbSession $db

$db public property The DB connection object or the application component ID of the DB connection. After the DbSession object is created, if you want to change this property, you should only assign it with a DB connection object. Starting from version 2.0.2, this can also be a configuration array for creating the object. public yii\db\Connection|array|string $db = 'db'

test\Fixture afterLoad()

afterLoad() public method This method is called AFTER all fixture data have been loaded for the current test. public void afterLoad ( )

mongodb\rbac\Permission $parents

$parents public property List of parent item names. public array|null $parents = null

sphinx\MatchExpression $match

$match public property MATCH expression. For example: ['title' => 'Yii', 'content' => 'Sphinx']. Note: being specified as a plain string this value will not be quoted or escaped, do not pass possible unsecured values (like the ones obtained from HTTP request) as a direct value. See also match(). public string|array|yii\db\Expression $match = null

sphinx\MatchBuilder $db

$db public property The Sphinx connection. public yii\sphinx\Connection $db = null