コード例 #1
0
ファイル: PadPresenter.php プロジェクト: martinmayer/notejam
 /**
  * Since the pad is required for the edit,
  * if it haven't been found, the presenter should end with 404 error.
  *
  * Prepares template variables for the detail action.
  */
 public function actionDetail($id, $order = 'name')
 {
     if (!$this->pad) {
         $this->error();
     }
     $this->template->notes = $this->noteRepository->findBy(['user' => $this->getUser()->getId(), 'pad' => $this->pad->getId()], $this->noteRepository->buildOrderBy($order));
 }
コード例 #2
0
ファイル: NotePresenter.php プロジェクト: shutkos/notejam
 /**
  * Prepares template variables for the default action.
  *
  * @param string $order
  */
 public function renderDefault($order = 'name')
 {
     $this->template->notes = $this->noteRepository->findBy(['user' => $this->getUser()->getId()], $this->noteRepository->buildOrderBy($order));
 }