Bilişim dünyasına kaliteli, özgün ve Türkçe içerikler kazandırmayı hedefleyen bir platform..

friends friends friends

Yii2 Framework Views Trigger Events

  • EVENT_BEGIN_BODY − triggered in layouts by the call of yii\web\View::beginBody().
  • EVENT_END_BODY − triggered in layouts by the call of yii\web\View::endBody().
  • EVENT_BEGIN_PAGE − triggered in layouts by the call of yii\web\View::beginPage().
  • EVENT_END_PAGE − triggered in layouts by the call of yii\web\View::endPage().
  • EVENT_BEFORE_RENDER − triggered in a controller at the beginning of rendering a file.
  • EVENT_AFTER_RENDER − triggered after rendering a file
public function actionAbout() {
   \Yii::$app->view->on(View::EVENT_BEGIN_BODY, function () {
      echo date('m.d.Y H:i:s');
   });
   return $this->render('about');
}
 link
Event trigger
0 Beğeni
Yii2 Framework
Önceki Yazı

Javascript Değişkenini PHP de Kullanma

22 Ekim 2020 tarihinde yayınlandı.
Sonraki Yazı

Yii2 Framework Sayfa İçi Arama

22 Ekim 2020 tarihinde yayınlandı.
arrow