$value public property
The value that will be assigned to the current attributes. This can be an anonymous function, callable in array format (e.g. [$this, 'methodName']
), an \yii\behaviors\Expression object representing a DB expression (e.g. new Expression('NOW()')
), scalar, string or an arbitrary value. If the former, the return value of the function will be assigned to the attributes. The signature of the function should be as follows,
function ($event) { // return value will be assigned to the attribute }
The value that will be assigned to the current attributes. This can be an anonymous function, callable in array format (e.g. [$this, 'methodName']
), an \yii\behaviors\Expression object representing a DB expression (e.g. new Expression('NOW()')
), scalar, string or an arbitrary value. If the former, the return value of the function will be assigned to the attributes. The signature of the function should be as follows,
function ($event) { // return value will be assigned to the attribute }
In case, when the property is null
, the value of Yii::$app->user->id
will be used as the value.
public mixed $value = null
Please login to continue.