Esempio 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();
 }
Esempio 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.');
 }