Model::setVisible
Set Visible flag name
Description
public self Model::setVisible( string|null $visible )
When the model was created with $is_admin = false, reads only return rows whose visible column is 1. null or '' removes the flag. Throws InvalidArgumentException when $visible is not a plain name.
Arguments
| Name | Data type | Default | Remarks |
|---|---|---|---|
| $visible | string/null | Public flag column name |
Example
Controller
$model = new Model();
$model->setVisible('visible');
// Same as the following
$model = new Model(false, array(
'visible' => 'visible',
));