| 1 | <?php |
||
| 8 | class Field extends Fluent |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Field type. |
||
| 12 | * |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | protected $type = 'text'; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Password constructor. |
||
| 19 | */ |
||
| 20 | public function __construct($attributes = []) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param string $name |
||
| 29 | * @param string $label |
||
| 30 | * @return Field|Select|Password|DateTime|Checkbox|Radio|Hidden|ReadOnly|TextArea |
||
| 31 | */ |
||
| 32 | public static function make($name, $label = '') |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param string $label |
||
| 48 | * @return $this |
||
| 49 | */ |
||
| 50 | public function label($label) |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @param string $name |
||
| 59 | * @return $this |
||
| 60 | */ |
||
| 61 | public function name($name) |
||
| 67 | |||
| 68 | /** |
||
| 69 | * @param string $data |
||
| 70 | * @return $this |
||
| 71 | */ |
||
| 72 | public function data($data) |
||
| 78 | |||
| 79 | /** |
||
| 80 | * @param string $type |
||
| 81 | * @return $this |
||
| 82 | */ |
||
| 83 | public function type($type) |
||
| 89 | } |
||
| 90 |