public function beforeAction($action) { if ($action->id === 'stop') { return parent::beforeAction($action); } $file = LuLu::getAlias('@data/install.lock'); if (file_exists($file)) { return $this->redirect(['stop']); } return parent::beforeAction($action); }
public function init() { parent::init(); // custom initialization code goes here }