public function beforeConstruct() { $that = $this; $this->onAfterConstruct(function () use($that) { $that->status = true; }); }