Ejemplo n.º 1
0
 protected function deleteForm($action)
 {
     static $form;
     if (!$form) {
         $form = new Form();
     }
     $form->setAction($action)->setSubmit('Delete');
     $token = $this->session->generateCsrf();
     return $form->render();
 }
Ejemplo n.º 2
0
 function __construct($id, $name)
 {
     parent::__construct();
     $this->setAction('?category/save/' . $id)->add('name', $name, '[a-zA-Z]+', 'Name must contains only letters.');
 }