Ejemplo n.º 1
0
 public function listLatestActualities($count)
 {
     $template = clone $this->template;
     $template->setFile(Environment::expand('%templatesDir%/FrontModule/@actualities.phtml'));
     $template->presenter = $this;
     $template->control = $this;
     $template->actualities = mapper::actualities()->findLatest($count);
     return "/---html\n" . $template->__toString() . "\n\\---\n";
 }
Ejemplo n.º 2
0
 public function onActualityEditSubmit(Form $form)
 {
     if (!$form->isValid()) {
         return;
     }
     mapper::actualities()->updateOne($form->getValues());
     adminlog::log(__('Updated actuality "%s"'), $form['nice_name']->getValue());
     $this->redirect('actualities');
     $this->terminate();
 }