public function execute() { $config = $this->getConfig(); $formRol = filter_input_array(INPUT_POST)['rol']; $rol = new rolTable($config); $rol->setNombre($formRol['nombre']); $this->objRol = $rol->save(); header('Location: ' . $config->getUrl() . 'index.php/rol/index'); }
public function execute() { $config = $this->getConfig(); $formRol = filter_input_array(INPUT_POST)['rol']; //validaciones $rol = new rolTable($config); $rol->setId($formRol['id']); $rol->setNombre($formRol['descripcion']); $this->objRol = $rol->update(); header('Location: ' . $config->getUrl() . 'index.php/rol/index'); }