Refactored Form.
This commit is contained in:
parent
1fdf9a7ab1
commit
cfe93434ad
45 changed files with 58 additions and 83 deletions
27
src/PHPCensor/Form/Element/Button.php
Normal file
27
src/PHPCensor/Form/Element/Button.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
namespace PHPCensor\Form\Element;
|
||||
|
||||
use PHPCensor\Form\Input;
|
||||
use PHPCensor\View;
|
||||
|
||||
class Button extends Input
|
||||
{
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public function validate()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param View $view
|
||||
*/
|
||||
protected function onPreRender(View &$view)
|
||||
{
|
||||
parent::onPreRender($view);
|
||||
|
||||
$view->type = 'button';
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue