/** * * @param \yii\web\Application $app * @param array $config */ protected function initialize($app, $config) { if ($app instanceof \yii\web\Application) { $app->attachBehaviors([hooks\TransferNoticeHook::className() => hooks\TransferNoticeHook::className()]); AppHelper::registerAccessHandler(models\Transfer::className(), AccessHandler::className()); AppHelper::registerAccessHandler(models\TransferNotice::className(), AccessHandler::className()); } }
/** * @return \yii\db\ActiveQuery */ public function getTransferNotice() { return $this->hasOne(TransferNotice::className(), ['id_transfer' => 'id_transfer']); }