public lock ( |
||
$user | The User on whose behalf the lock set | |
$comment | string | Comment describing the reason and/or purpose of the lock |
$restrict | boolean | optional Strict lock flag (I have no idea what that means [author's note]) |
return |
public function lock(User $user, $comment, $restrict = false)
{
$this->_settings->saveSettings([FarmSetting::LOCK => 1, FarmSetting::LOCK_BY => $user->id, FarmSetting::LOCK_COMMENT => $comment, FarmSetting::LOCK_UNLOCK_BY => '', FarmSetting::LOCK_RESTRICT => $restrict]);
return $this;
}