Exemplo n.º 1
0
 /**
  * This method is called on the presenter lifecycle begin,
  * so we can put here code that would be duplicated among the action methods.
  *
  * Also, this is a good place to add some common checks that apply to all presenter actions.
  */
 protected function startup()
 {
     parent::startup();
     // so we don't have to repeat the code in every action
     if ($id = $this->getParameter('id')) {
         $this->pad = $this->padRepository->findOneBy(['id' => $id, 'user' => $this->user->getId()]);
     }
 }