メインコンテンツまでスキップ
Version: Fegg 5.x(開発版)

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​

NameData typeDefaultRemarks
$visiblestring/nullPublic flag column name

Example​

Controller
$model = new Model();
$model->setVisible('visible');

// Same as the following
$model = new Model(false, array(
'visible' => 'visible',
));