1 | <?php |
||
13 | abstract class Element implements |
||
14 | ElementInterface, |
||
15 | WithModel, |
||
16 | Arrayable, |
||
17 | Jsonable, |
||
18 | JsonSerializable |
||
19 | { |
||
20 | protected $type; |
||
21 | |||
22 | protected $name; |
||
23 | protected $title; |
||
24 | |||
25 | /** |
||
26 | * @var mixed |
||
27 | */ |
||
28 | protected $defaultValue; |
||
29 | |||
30 | /** |
||
31 | * @var \Illuminate\Database\Eloquent\Model |
||
32 | */ |
||
33 | protected $model; |
||
34 | |||
35 | public function __construct($name, $title) |
||
40 | |||
41 | public function getName() |
||
45 | |||
46 | public function setName($value) |
||
52 | |||
53 | public function getTitle() |
||
57 | |||
58 | public function setTitle($value) |
||
64 | |||
65 | public function getModel() |
||
69 | |||
70 | public function setModel(Model $model) |
||
76 | |||
77 | public function getValue() |
||
81 | |||
82 | protected function getModelValue() |
||
106 | |||
107 | protected function getDefaultValue() |
||
111 | |||
112 | public function toArray() |
||
120 | |||
121 | public function jsonSerialize() |
||
125 | |||
126 | public function toJson($options = 0) |
||
130 | |||
131 | public function __toString() |
||
135 | } |
||
136 |