Exemple #1
0
 /**
  * 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));
 }
Exemple #2
0
 /**
  * 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));
 }