c063666464492fa66be7d8420fa38e0b95f176a6
[yaffs-website] / web / core / lib / Drupal / Core / Form / FormStateDecoratorBase.php
1 <?php
2
3 namespace Drupal\Core\Form;
4
5 use Drupal\Core\Url;
6 use Symfony\Component\HttpFoundation\Response;
7
8 /**
9  * Decorates another form state.
10  */
11 abstract class FormStateDecoratorBase implements FormStateInterface {
12
13   /**
14    * The decorated form state.
15    *
16    * @var \Drupal\Core\Form\FormStateInterface
17    */
18   protected $decoratedFormState;
19
20   /**
21    * {@inheritdoc}
22    */
23   public function setFormState(array $form_state_additions) {
24     $this->decoratedFormState->setFormState($form_state_additions);
25
26     return $this;
27   }
28
29   /**
30    * {@inheritdoc}
31    */
32   public function setAlwaysProcess($always_process = TRUE) {
33     $this->decoratedFormState->setAlwaysProcess($always_process);
34
35     return $this;
36   }
37
38   /**
39    * {@inheritdoc}
40    */
41   public function getAlwaysProcess() {
42     return $this->decoratedFormState->getAlwaysProcess();
43   }
44
45   /**
46    * {@inheritdoc}
47    */
48   public function setButtons(array $buttons) {
49     $this->decoratedFormState->setButtons($buttons);
50
51     return $this;
52   }
53
54   /**
55    * {@inheritdoc}
56    */
57   public function getButtons() {
58     return $this->decoratedFormState->getButtons();
59   }
60
61   /**
62    * {@inheritdoc}
63    */
64   public function setCached($cache = TRUE) {
65     $this->decoratedFormState->setCached($cache);
66
67     return $this;
68   }
69
70   /**
71    * {@inheritdoc}
72    */
73   public function isCached() {
74     return $this->decoratedFormState->isCached();
75   }
76
77   /**
78    * {@inheritdoc}
79    */
80   public function disableCache() {
81     $this->decoratedFormState->disableCache();
82
83     return $this;
84   }
85
86   /**
87    * {@inheritdoc}
88    */
89   public function setExecuted() {
90     $this->decoratedFormState->setExecuted();
91
92     return $this;
93   }
94
95   /**
96    * {@inheritdoc}
97    */
98   public function isExecuted() {
99     return $this->decoratedFormState->isExecuted();
100   }
101
102   /**
103    * {@inheritdoc}
104    */
105   public function setGroups(array $groups) {
106     $this->decoratedFormState->setGroups($groups);
107
108     return $this;
109   }
110
111   /**
112    * {@inheritdoc}
113    */
114   public function &getGroups() {
115     return $this->decoratedFormState->getGroups();
116   }
117
118   /**
119    * {@inheritdoc}
120    */
121   public function setHasFileElement($has_file_element = TRUE) {
122     $this->decoratedFormState->setHasFileElement($has_file_element);
123
124     return $this;
125   }
126
127   /**
128    * {@inheritdoc}
129    */
130   public function hasFileElement() {
131     return $this->decoratedFormState->hasFileElement();
132   }
133
134   /**
135    * {@inheritdoc}
136    */
137   public function setLimitValidationErrors($limit_validation_errors) {
138     $this->decoratedFormState->setLimitValidationErrors($limit_validation_errors);
139
140     return $this;
141   }
142
143   /**
144    * {@inheritdoc}
145    */
146   public function getLimitValidationErrors() {
147     return $this->decoratedFormState->getLimitValidationErrors();
148   }
149
150   /**
151    * {@inheritdoc}
152    */
153   public function setMethod($method) {
154     $this->decoratedFormState->setMethod($method);
155
156     return $this;
157   }
158
159   /**
160    * {@inheritdoc}
161    */
162   public function isMethodType($method_type) {
163     return $this->decoratedFormState->isMethodType($method_type);
164   }
165
166   /**
167    * {@inheritdoc}
168    */
169   public function setRequestMethod($method) {
170     $this->decoratedFormState->setRequestMethod($method);
171
172     return $this;
173   }
174
175   /**
176    * {@inheritdoc}
177    */
178   public function setValidationEnforced($must_validate = TRUE) {
179     $this->decoratedFormState->setValidationEnforced($must_validate);
180
181     return $this;
182   }
183
184   /**
185    * {@inheritdoc}
186    */
187   public function isValidationEnforced() {
188     return $this->decoratedFormState->isValidationEnforced();
189   }
190
191   /**
192    * {@inheritdoc}
193    */
194   public function disableRedirect($no_redirect = TRUE) {
195     $this->decoratedFormState->disableRedirect($no_redirect);
196
197     return $this;
198   }
199
200   /**
201    * {@inheritdoc}
202    */
203   public function isRedirectDisabled() {
204     return $this->decoratedFormState->isRedirectDisabled();
205   }
206
207   /**
208    * {@inheritdoc}
209    */
210   public function setProcessInput($process_input = TRUE) {
211     $this->decoratedFormState->setProcessInput($process_input);
212
213     return $this;
214   }
215
216   /**
217    * {@inheritdoc}
218    */
219   public function isProcessingInput() {
220     return $this->decoratedFormState->isProcessingInput();
221   }
222
223   /**
224    * {@inheritdoc}
225    */
226   public function setProgrammed($programmed = TRUE) {
227     $this->decoratedFormState->setProgrammed($programmed);
228
229     return $this;
230   }
231
232   /**
233    * {@inheritdoc}
234    */
235   public function isProgrammed() {
236     return $this->decoratedFormState->isProgrammed();
237   }
238
239   /**
240    * {@inheritdoc}
241    */
242   public function setProgrammedBypassAccessCheck($programmed_bypass_access_check = TRUE) {
243     $this->decoratedFormState->setProgrammedBypassAccessCheck($programmed_bypass_access_check);
244
245     return $this;
246   }
247
248   /**
249    * {@inheritdoc}
250    */
251   public function isBypassingProgrammedAccessChecks() {
252     return $this->decoratedFormState->isBypassingProgrammedAccessChecks();
253   }
254
255   /**
256    * {@inheritdoc}
257    */
258   public function setRebuildInfo(array $rebuild_info) {
259     $this->decoratedFormState->setRebuildInfo($rebuild_info);
260
261     return $this;
262   }
263
264   /**
265    * {@inheritdoc}
266    */
267   public function getRebuildInfo() {
268     return $this->decoratedFormState->getRebuildInfo();
269   }
270
271   /**
272    * {@inheritdoc}
273    */
274   public function addRebuildInfo($property, $value) {
275     $this->decoratedFormState->addRebuildInfo($property, $value);
276
277     return $this;
278   }
279
280   /**
281    * {@inheritdoc}
282    */
283   public function setStorage(array $storage) {
284     $this->decoratedFormState->setStorage($storage);
285
286     return $this;
287   }
288
289   /**
290    * {@inheritdoc}
291    */
292   public function &getStorage() {
293     return $this->decoratedFormState->getStorage();
294   }
295
296   /**
297    * {@inheritdoc}
298    */
299   public function setSubmitHandlers(array $submit_handlers) {
300     $this->decoratedFormState->setSubmitHandlers($submit_handlers);
301
302     return $this;
303   }
304
305   /**
306    * {@inheritdoc}
307    */
308   public function getSubmitHandlers() {
309     return $this->decoratedFormState->getSubmitHandlers();
310   }
311
312   /**
313    * {@inheritdoc}
314    */
315   public function setSubmitted() {
316     $this->decoratedFormState->setSubmitted();
317
318     return $this;
319   }
320
321   /**
322    * {@inheritdoc}
323    */
324   public function isSubmitted() {
325     return $this->decoratedFormState->isSubmitted();
326   }
327
328   /**
329    * {@inheritdoc}
330    */
331   public function setTemporary(array $temporary) {
332     $this->decoratedFormState->setTemporary($temporary);
333
334     return $this;
335   }
336
337   /**
338    * {@inheritdoc}
339    */
340   public function getTemporary() {
341     return $this->decoratedFormState->getTemporary();
342   }
343
344   /**
345    * {@inheritdoc}
346    */
347   public function &getTemporaryValue($key) {
348     return $this->decoratedFormState->getTemporaryValue($key);
349   }
350
351   /**
352    * {@inheritdoc}
353    */
354   public function setTemporaryValue($key, $value) {
355     $this->decoratedFormState->setTemporaryValue($key, $value);
356
357     return $this;
358   }
359
360   /**
361    * {@inheritdoc}
362    */
363   public function hasTemporaryValue($key) {
364     return $this->decoratedFormState->hasTemporaryValue($key);
365   }
366
367   /**
368    * {@inheritdoc}
369    */
370   public function setTriggeringElement($triggering_element) {
371     $this->decoratedFormState->setTriggeringElement($triggering_element);
372
373     return $this;
374   }
375
376   /**
377    * {@inheritdoc}
378    */
379   public function &getTriggeringElement() {
380     return $this->decoratedFormState->getTriggeringElement();
381   }
382
383   /**
384    * {@inheritdoc}
385    */
386   public function setValidateHandlers(array $validate_handlers) {
387     $this->decoratedFormState->setValidateHandlers($validate_handlers);
388
389     return $this;
390   }
391
392   /**
393    * {@inheritdoc}
394    */
395   public function getValidateHandlers() {
396     return $this->decoratedFormState->getValidateHandlers();
397   }
398
399   /**
400    * {@inheritdoc}
401    */
402   public function setValidationComplete($validation_complete = TRUE) {
403     $this->decoratedFormState->setValidationComplete($validation_complete);
404
405     return $this;
406   }
407
408   /**
409    * {@inheritdoc}
410    */
411   public function isValidationComplete() {
412     return $this->decoratedFormState->isValidationComplete();
413   }
414
415   /**
416    * {@inheritdoc}
417    */
418   public function loadInclude($module, $type, $name = NULL) {
419     return $this->decoratedFormState->loadInclude($module, $type, $name);
420   }
421
422   /**
423    * {@inheritdoc}
424    */
425   public function getCacheableArray() {
426     return $this->decoratedFormState->getCacheableArray();
427   }
428
429   /**
430    * {@inheritdoc}
431    */
432   public function setCompleteForm(array &$complete_form) {
433     $this->decoratedFormState->setCompleteForm($complete_form);
434
435     return $this;
436   }
437
438   /**
439    * {@inheritdoc}
440    */
441   public function &getCompleteForm() {
442     return $this->decoratedFormState->getCompleteForm();
443   }
444
445   /**
446    * {@inheritdoc}
447    */
448   public function &get($property) {
449     return $this->decoratedFormState->get($property);
450   }
451
452   /**
453    * {@inheritdoc}
454    */
455   public function set($property, $value) {
456     $this->decoratedFormState->set($property, $value);
457
458     return $this;
459   }
460
461   /**
462    * {@inheritdoc}
463    */
464   public function has($property) {
465     return $this->decoratedFormState->has($property);
466   }
467
468   /**
469    * {@inheritdoc}
470    */
471   public function setBuildInfo(array $build_info) {
472     $this->decoratedFormState->setBuildInfo($build_info);
473
474     return $this;
475   }
476
477   /**
478    * {@inheritdoc}
479    */
480   public function getBuildInfo() {
481     return $this->decoratedFormState->getBuildInfo();
482   }
483
484   /**
485    * {@inheritdoc}
486    */
487   public function addBuildInfo($property, $value) {
488     $this->decoratedFormState->addBuildInfo($property, $value);
489
490     return $this;
491   }
492
493   /**
494    * {@inheritdoc}
495    */
496   public function &getUserInput() {
497     return $this->decoratedFormState->getUserInput();
498   }
499
500   /**
501    * {@inheritdoc}
502    */
503   public function setUserInput(array $user_input) {
504     $this->decoratedFormState->setUserInput($user_input);
505
506     return $this;
507   }
508
509   /**
510    * {@inheritdoc}
511    */
512   public function &getValues() {
513     return $this->decoratedFormState->getValues();
514   }
515
516   /**
517    * {@inheritdoc}
518    */
519   public function &getValue($key, $default = NULL) {
520     return $this->decoratedFormState->getValue($key, $default);
521   }
522
523   /**
524    * {@inheritdoc}
525    */
526   public function setValues(array $values) {
527     $this->decoratedFormState->setValues($values);
528
529     return $this;
530   }
531
532   /**
533    * {@inheritdoc}
534    */
535   public function setValue($key, $value) {
536     $this->decoratedFormState->setValue($key, $value);
537
538     return $this;
539   }
540
541   /**
542    * {@inheritdoc}
543    */
544   public function unsetValue($key) {
545     $this->decoratedFormState->unsetValue($key);
546
547     return $this;
548   }
549
550   /**
551    * {@inheritdoc}
552    */
553   public function hasValue($key) {
554     return $this->decoratedFormState->hasValue($key);
555   }
556
557   /**
558    * {@inheritdoc}
559    */
560   public function isValueEmpty($key)  {
561     return $this->decoratedFormState->isValueEmpty($key);
562   }
563
564   /**
565    * {@inheritdoc}
566    */
567   public function setValueForElement(array $element, $value) {
568     $this->decoratedFormState->setValueForElement($element, $value);
569
570     return $this;
571   }
572
573   /**
574    * {@inheritdoc}
575    */
576   public function setResponse(Response $response) {
577     $this->decoratedFormState->setResponse($response);
578
579     return $this;
580   }
581
582   /**
583    * {@inheritdoc}
584    */
585   public function getResponse() {
586     return $this->decoratedFormState->getResponse();
587   }
588
589   /**
590    * {@inheritdoc}
591    */
592   public function setRedirect($route_name, array $route_parameters = [], array $options = []) {
593     $this->decoratedFormState->setRedirect($route_name, $route_parameters, $options);
594
595     return $this;
596   }
597
598   /**
599    * {@inheritdoc}
600    */
601   public function setRedirectUrl(Url $url) {
602     $this->decoratedFormState->setRedirectUrl($url);
603
604     return $this;
605   }
606
607   /**
608    * {@inheritdoc}
609    */
610   public function getRedirect() {
611     return $this->decoratedFormState->getRedirect();
612   }
613
614   /**
615    * {@inheritdoc}
616    */
617   public static function hasAnyErrors() {
618     return FormState::hasAnyErrors();
619   }
620
621   /**
622    * {@inheritdoc}
623    */
624   public function setErrorByName($name, $message = '') {
625     $this->decoratedFormState->setErrorByName($name, $message);
626
627     return $this;
628   }
629
630   /**
631    * {@inheritdoc}
632    */
633   public function setError(array &$element, $message = '') {
634     $this->decoratedFormState->setError($element, $message);
635
636     return $this;
637   }
638
639   /**
640    * {@inheritdoc}
641    */
642   public function clearErrors() {
643     $this->decoratedFormState->clearErrors();
644   }
645
646   /**
647    * {@inheritdoc}
648    */
649   public function getError(array $element) {
650     return $this->decoratedFormState->getError($element);
651   }
652
653   /**
654    * {@inheritdoc}
655    */
656   public function getErrors() {
657     return $this->decoratedFormState->getErrors();
658   }
659
660   /**
661    * {@inheritdoc}
662    */
663   public function setRebuild($rebuild = TRUE) {
664     $this->decoratedFormState->setRebuild($rebuild);
665
666     return $this;
667   }
668
669   /**
670    * {@inheritdoc}
671    */
672   public function isRebuilding() {
673     return $this->decoratedFormState->isRebuilding();
674   }
675
676   /**
677    * {@inheritdoc}
678    */
679   public function setInvalidToken($invalid_token) {
680     $this->decoratedFormState->setInvalidToken($invalid_token);
681
682     return $this;
683   }
684
685   /**
686    * {@inheritdoc}
687    */
688   public function hasInvalidToken() {
689     return $this->decoratedFormState->hasInvalidToken();
690   }
691
692   /**
693    * {@inheritdoc}
694    */
695   public function prepareCallback($callback) {
696     return $this->decoratedFormState->prepareCallback($callback);
697   }
698
699   /**
700    * {@inheritdoc}
701    */
702   public function setFormObject(FormInterface $form_object) {
703     $this->decoratedFormState->setFormObject($form_object);
704
705     return $this;
706   }
707
708   /**
709    * {@inheritdoc}
710    */
711   public function getFormObject() {
712     return $this->decoratedFormState->getFormObject();
713   }
714
715   /**
716    * {@inheritdoc}
717    */
718   public function getCleanValueKeys() {
719     return $this->decoratedFormState->getCleanValueKeys();
720   }
721
722   /**
723    * {@inheritdoc}
724    */
725   public function setCleanValueKeys(array $cleanValueKeys) {
726     $this->decoratedFormState->setCleanValueKeys($cleanValueKeys);
727
728     return $this;
729   }
730
731   /**
732    * {@inheritdoc}
733    */
734   public function addCleanValueKey($cleanValueKey) {
735     $this->decoratedFormState->addCleanValueKey($cleanValueKey);
736
737     return $this;
738   }
739
740   /**
741    * {@inheritdoc}
742    */
743   public function cleanValues() {
744     $this->decoratedFormState->cleanValues();
745
746     return $this;
747   }
748
749 }