1 | <?php |
||
15 | class EmbedSettingsForm extends ConfigFormBase { |
||
16 | |||
17 | /** |
||
18 | * The stream wrapper manager. |
||
19 | * |
||
20 | * @var \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface |
||
21 | */ |
||
22 | protected $streamWrapperManager; |
||
23 | |||
24 | /** |
||
25 | * Constructs a EmbedSettingsForm object. |
||
26 | * |
||
27 | * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory |
||
28 | * The factory for configuration objects. |
||
29 | * @param \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface $stream_wrapper_manager |
||
30 | * The stream wrapper manager. |
||
31 | */ |
||
32 | public function __construct(ConfigFactoryInterface $config_factory, StreamWrapperManagerInterface $stream_wrapper_manager) { |
||
36 | |||
37 | /** |
||
38 | * {@inheritdoc} |
||
39 | */ |
||
40 | public static function create(ContainerInterface $container) { |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | public function getFormId() { |
||
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | protected function getEditableConfigNames() { |
||
60 | |||
61 | /** |
||
62 | * {@inheritdoc} |
||
63 | */ |
||
64 | public function buildForm(array $form, FormStateInterface $form_state) { |
||
86 | |||
87 | /** |
||
88 | * Form API callback. |
||
89 | * |
||
90 | * Removes slashes from the beginning and end of the destination value and |
||
91 | * ensures that the file directory path is not included at the beginning of the |
||
92 | * value. |
||
93 | * |
||
94 | * This function is assigned as an #element_validate callback in |
||
95 | * fieldSettingsForm(). |
||
96 | */ |
||
97 | public static function validateDirectory($element, FormStateInterface $form_state) { |
||
102 | |||
103 | /** |
||
104 | * {@inheritdoc} |
||
105 | */ |
||
106 | public function submitForm(array &$form, FormStateInterface $form_state) { |
||
114 | |||
115 | } |
||
116 |