/** * Creates a new contenidoextra */ public function createAction() { if (!$this->request->isPost()) { return $this->dispatcher->forward(array("controller" => "contenidoextra", "action" => "index")); } $contenidoextra = new Contenidoextra(); $contenidoextra->setContenidoextraDescripcion($this->request->getPost("contenidoExtra_descripcion")); $contenidoextra->setContenidoextraHabilitado($this->request->getPost("contenidoExtra_habilitado")); $contenidoextra->setContenidoextraColumnaid($this->request->getPost("contenidoExtra_columnaId")); if (!$contenidoextra->save()) { foreach ($contenidoextra->getMessages() as $message) { $this->flash->error($message); } return $this->dispatcher->forward(array("controller" => "contenidoextra", "action" => "new")); } $this->flash->success("contenidoextra was created successfully"); return $this->dispatcher->forward(array("controller" => "contenidoextra", "action" => "index")); }