1 | <?php |
||
20 | abstract class AbstractType extends Model implements TypeInterface |
||
21 | { |
||
22 | use BaseTrait; |
||
23 | |||
24 | /** |
||
25 | * The scenario used to validate input data |
||
26 | */ |
||
27 | const SCENARIO_INPUT = 'input'; |
||
28 | |||
29 | /** |
||
30 | * The base template path to the field type templates |
||
31 | */ |
||
32 | const BASE_TEMPLATE_PATH = 'link/_components/fieldtypes/Link/types'; |
||
33 | |||
34 | /** |
||
35 | * The settings template path |
||
36 | */ |
||
37 | const SETTINGS_TEMPLATE_PATH = self::BASE_TEMPLATE_PATH . '/settings'; |
||
38 | |||
39 | /** |
||
40 | * The input template path |
||
41 | */ |
||
42 | const INPUT_TEMPLATE_PATH = self::BASE_TEMPLATE_PATH . '/input'; |
||
43 | |||
44 | /** |
||
45 | * @inheritdoc |
||
46 | * @throws \ReflectionException |
||
47 | */ |
||
48 | public static function displayName(): string |
||
53 | |||
54 | /** |
||
55 | * @inheritdoc |
||
56 | * @throws \Twig_Error_Loader |
||
57 | * @throws \yii\base\Exception |
||
58 | */ |
||
59 | public function settingsHtml(): string |
||
68 | |||
69 | /** |
||
70 | * Populate valid properties. This occurs when we have a content value |
||
71 | * and we need to populate it's contents on an existing TypeInterface |
||
72 | * |
||
73 | * @param array $properties |
||
74 | */ |
||
75 | public function populate(array $properties) |
||
92 | |||
93 | /** |
||
94 | * @inheritdoc |
||
95 | * @throws \Twig_Error_Loader |
||
96 | * @throws \yii\base\Exception |
||
97 | */ |
||
98 | public function inputHtml(Link $field): string |
||
108 | |||
109 | /** |
||
110 | * @return bool |
||
111 | */ |
||
112 | public function validateInput(): bool |
||
122 | |||
123 | /** |
||
124 | * @inheritdoc |
||
125 | */ |
||
126 | public function rules() |
||
158 | } |
||
159 |