public function actionActivityBookingsPdf() { $this->layout = 'main-login'; $pdf = Yii::$app->pdf; $data = Actives::find(); $dataProvider = new ActiveDataProvider(['query' => $data, 'pagination' => false, 'sort' => false]); $pdf->content = $this->render('activity_bookings_pdf', ['data' => $dataProvider]); return $pdf->render(); }
private function getActivity() { return $this->hasOne(Actives::className(), ['actives_id' => 'class_activity'])->select('actives_name')->where(['actives_id' => $this->class_activity])->one(); }