Exemplo n.º 1
0
 /**
  * @inheritdoc
  */
 public function disableContentContainer(ContentContainerActiveRecord $container)
 {
     parent::disableContentContainer($container);
     foreach (Note::find()->contentContainer($container)->all() as $note) {
         $note->delete();
     }
 }
 public function actionEdit()
 {
     $id = (int) Yii::$app->request->get('id', 0);
     $note = Note::find()->contentContainer($this->contentContainer)->readable()->where(['note.id' => $id])->one();
     // get current revision count
     $revisionCountNow = $note->getRevisionCount();
     $revisionCountByOpening = (int) Yii::$app->request->get('revision', 0);
     /*
      if ($revisionCountNow != $revisionCountByOpening) {
     
      }
     */
     $this->redirect($this->contentContainer->getUrl());
 }