[BUGFIX] Notice free FormEngine testing
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Tests / Unit / Form / FormDataProvider / EvaluateDisplayConditionsTest.php
1 <?php
2 declare(strict_types = 1);
3 namespace TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider;
4
5 /*
6 * This file is part of the TYPO3 CMS project.
7 *
8 * It is free software; you can redistribute it and/or modify it under
9 * the terms of the GNU General Public License, either version 2
10 * of the License, or any later version.
11 *
12 * For the full copyright and license information, please read the
13 * LICENSE.txt file that was distributed with this source code.
14 *
15 * The TYPO3 project - inspiring people to share!
16 */
17
18 use Prophecy\Prophecy\ObjectProphecy;
19 use TYPO3\CMS\Backend\Form\FormDataProvider\EvaluateDisplayConditions;
20 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
21 use TYPO3\CMS\Core\Utility\ArrayUtility;
22 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
23
24 /**
25 * Test case
26 */
27 class EvaluateDisplayConditionsTest extends UnitTestCase
28 {
29 /**
30 * @test
31 */
32 public function addDataThrowsExceptionIfMultipleConditionsAreNotCombinedWithAndOrOr()
33 {
34 $input = [
35 'databaseRow' => [],
36 'processedTca' => [
37 'columns' => [
38 'field_1' => [
39 'displayCond' => [
40 'FOO' => [
41 'condition1',
42 'condition2',
43 ],
44 ],
45 ],
46 ],
47 ],
48 ];
49 $this->expectException(\RuntimeException::class);
50 $this->expectExceptionCode(1481380393);
51 (new EvaluateDisplayConditions())->addData($input);
52 }
53
54 /**
55 * @test
56 */
57 public function addDataThrowsExceptionWithMultipleConditionsCombinedWithAndHavingOnlyOneSubCondition()
58 {
59 $input = [
60 'databaseRow' => [],
61 'processedTca' => [
62 'columns' => [
63 'field_1' => [
64 'displayCond' => [
65 'AND' => [
66 'condition1',
67 ],
68 ],
69 ],
70 ],
71 ],
72 ];
73 $this->expectException(\RuntimeException::class);
74 $this->expectExceptionCode(1481464101);
75 (new EvaluateDisplayConditions())->addData($input);
76 }
77
78 /**
79 * @test
80 */
81 public function addDataThrowsExceptionIfConditionIsNotStringOrArray()
82 {
83 $input = [
84 'databaseRow' => [],
85 'processedTca' => [
86 'columns' => [
87 'field_1' => [
88 'displayCond' => false,
89 ],
90 ],
91 ],
92 ];
93 $this->expectException(\RuntimeException::class);
94 $this->expectExceptionCode(1481381058);
95 (new EvaluateDisplayConditions())->addData($input);
96 }
97
98 /**
99 * @test
100 */
101 public function addDataThrowsExceptionIfConditionTypeIsUnknown()
102 {
103 $input = [
104 'databaseRow' => [],
105 'processedTca' => [
106 'columns' => [
107 'field_1' => [
108 'displayCond' => 'foo',
109 ],
110 ],
111 ],
112 ];
113 $this->expectException(\RuntimeException::class);
114 $this->expectExceptionCode(1481381950);
115 (new EvaluateDisplayConditions())->addData($input);
116 }
117
118 /**
119 * @test
120 */
121 public function addDataThrowsExceptionIfFieldConditionHasNoFieldName()
122 {
123 $input = [
124 'databaseRow' => [],
125 'processedTca' => [
126 'columns' => [
127 'field_1' => [
128 'displayCond' => 'FIELD',
129 ],
130 ],
131 ],
132 ];
133 $this->expectException(\RuntimeException::class);
134 $this->expectExceptionCode(1481385695);
135 (new EvaluateDisplayConditions())->addData($input);
136 }
137
138 /**
139 * @test
140 */
141 public function addDataThrowsExceptionIfFieldConditionHasNoOperator()
142 {
143 $input = [
144 'databaseRow' => [],
145 'processedTca' => [
146 'columns' => [
147 'field_1' => [
148 'displayCond' => 'FIELD:fieldName',
149 ],
150 ],
151 ],
152 ];
153 $this->expectException(\RuntimeException::class);
154 $this->expectExceptionCode(1481386239);
155 (new EvaluateDisplayConditions())->addData($input);
156 }
157
158 /**
159 * @test
160 */
161 public function addDataThrowsExceptionIfFieldConditionHasInvalidOperator()
162 {
163 $input = [
164 'databaseRow' => [],
165 'processedTca' => [
166 'columns' => [
167 'field_1' => [
168 'displayCond' => 'FIELD:fieldName:foo',
169 ],
170 ],
171 ],
172 ];
173 $this->expectException(\RuntimeException::class);
174 $this->expectExceptionCode(1481386239);
175 (new EvaluateDisplayConditions())->addData($input);
176 }
177
178 /**
179 * @test
180 */
181 public function addDataThrowsExceptionIfFieldConditionHasNoOperand()
182 {
183 $input = [
184 'databaseRow' => [],
185 'processedTca' => [
186 'columns' => [
187 'field_1' => [
188 'displayCond' => 'FIELD:fieldName:REQ',
189 ],
190 ],
191 ],
192 ];
193 $this->expectException(\RuntimeException::class);
194 $this->expectExceptionCode(1481401543);
195 (new EvaluateDisplayConditions())->addData($input);
196 }
197
198 /**
199 * @test
200 */
201 public function addDataThrowsExceptionIfFieldConditionReqHasInvalidOperand()
202 {
203 $input = [
204 'databaseRow' => [],
205 'processedTca' => [
206 'columns' => [
207 'field_1' => [
208 'displayCond' => 'FIELD:fieldName:REQ:foo',
209 ],
210 ],
211 ],
212 ];
213 $this->expectException(\RuntimeException::class);
214 $this->expectExceptionCode(1481401892);
215 (new EvaluateDisplayConditions())->addData($input);
216 }
217
218 /**
219 * @test
220 */
221 public function addDataThrowsExceptionIfFieldConditionNumberComparisonHasInvalidOperand()
222 {
223 $input = [
224 'databaseRow' => [],
225 'processedTca' => [
226 'columns' => [
227 'field_1' => [
228 'displayCond' => 'FIELD:fieldName:>=:foo',
229 ],
230 ],
231 ],
232 ];
233 $this->expectException(\RuntimeException::class);
234 $this->expectExceptionCode(1481456806);
235 (new EvaluateDisplayConditions())->addData($input);
236 }
237
238 /**
239 * @test
240 */
241 public function addDataThrowsExceptionIfFieldConditionRangeComparisonHasInvalidOperand()
242 {
243 $input = [
244 'databaseRow' => [],
245 'processedTca' => [
246 'columns' => [
247 'field_1' => [
248 'displayCond' => 'FIELD:fieldName:-:23-',
249 ],
250 ],
251 ],
252 ];
253 $this->expectException(\RuntimeException::class);
254 $this->expectExceptionCode(1481457277);
255 (new EvaluateDisplayConditions())->addData($input);
256 }
257
258 /**
259 * @test
260 */
261 public function addDataThrowsExceptionIfFieldConditionRangeComparisonHasInvalidMaxOperand()
262 {
263 $input = [
264 'databaseRow' => [],
265 'processedTca' => [
266 'columns' => [
267 'field_1' => [
268 'displayCond' => 'FIELD:fieldName:-:23-foo',
269 ],
270 ],
271 ],
272 ];
273 $this->expectException(\RuntimeException::class);
274 $this->expectExceptionCode(1481457277);
275 (new EvaluateDisplayConditions())->addData($input);
276 }
277
278 /**
279 * @test
280 */
281 public function addDataThrowsExceptionIfRecordConditionHasNoNewKeyword()
282 {
283 $input = [
284 'databaseRow' => [],
285 'processedTca' => [
286 'columns' => [
287 'field_1' => [
288 'displayCond' => 'REC',
289 ],
290 ],
291 ],
292 ];
293 $this->expectException(\RuntimeException::class);
294 $this->expectExceptionCode(1481384784);
295 (new EvaluateDisplayConditions())->addData($input);
296 }
297
298 /**
299 * @test
300 */
301 public function addDataThrowsExceptionIfRecordConditionHasInvalidNewKeyword()
302 {
303 $input = [
304 'databaseRow' => [],
305 'processedTca' => [
306 'columns' => [
307 'field_1' => [
308 'displayCond' => 'REC:foo',
309 ],
310 ],
311 ],
312 ];
313 $this->expectException(\RuntimeException::class);
314 $this->expectExceptionCode(1481384784);
315 (new EvaluateDisplayConditions())->addData($input);
316 }
317
318 /**
319 * @test
320 */
321 public function addDataThrowsExceptionIfRecordConditionHasNoOperand()
322 {
323 $input = [
324 'databaseRow' => [],
325 'processedTca' => [
326 'columns' => [
327 'field_1' => [
328 'displayCond' => 'REC:NEW',
329 ],
330 ],
331 ],
332 ];
333 $this->expectException(\RuntimeException::class);
334 $this->expectExceptionCode(1481384947);
335 (new EvaluateDisplayConditions())->addData($input);
336 }
337
338 /**
339 * @test
340 */
341 public function addDataThrowsExceptionIfRecordConditionHasInvalidOperand()
342 {
343 $input = [
344 'databaseRow' => [],
345 'processedTca' => [
346 'columns' => [
347 'field_1' => [
348 'displayCond' => 'REC:NEW:foo',
349 ],
350 ],
351 ],
352 ];
353 $this->expectException(\RuntimeException::class);
354 $this->expectExceptionCode(1481385173);
355 (new EvaluateDisplayConditions())->addData($input);
356 }
357
358 /**
359 * @test
360 */
361 public function addDataThrowsExceptionIfRecordConditionHasNoUidInDatabaseRow()
362 {
363 $input = [
364 'databaseRow' => [],
365 'processedTca' => [
366 'columns' => [
367 'field_1' => [
368 'displayCond' => 'REC:NEW:false',
369 ],
370 ],
371 ],
372 ];
373 $this->expectException(\RuntimeException::class);
374 $this->expectExceptionCode(1481467208);
375 (new EvaluateDisplayConditions())->addData($input);
376 }
377
378 /**
379 * @test
380 */
381 public function addDataThrowsExceptionIfVersionConditionHasNoIsKeyword()
382 {
383 $input = [
384 'databaseRow' => [],
385 'processedTca' => [
386 'columns' => [
387 'field_1' => [
388 'displayCond' => 'VERSION',
389 ],
390 ],
391 ],
392 ];
393 $this->expectException(\RuntimeException::class);
394 $this->expectExceptionCode(1481383660);
395 (new EvaluateDisplayConditions())->addData($input);
396 }
397
398 /**
399 * @test
400 */
401 public function addDataThrowsExceptionIfVersionConditionHasInvalidIsKeyword()
402 {
403 $input = [
404 'databaseRow' => [],
405 'processedTca' => [
406 'columns' => [
407 'field_1' => [
408 'displayCond' => 'VERSION:foo',
409 ],
410 ],
411 ],
412 ];
413 $this->expectException(\RuntimeException::class);
414 $this->expectExceptionCode(1481383660);
415 (new EvaluateDisplayConditions())->addData($input);
416 }
417
418 /**
419 * @test
420 */
421 public function addDataThrowsExceptionIfVersionConditionHasNoOperand()
422 {
423 $input = [
424 'databaseRow' => [],
425 'processedTca' => [
426 'columns' => [
427 'field_1' => [
428 'displayCond' => 'VERSION:IS',
429 ],
430 ],
431 ],
432 ];
433 $this->expectException(\RuntimeException::class);
434 $this->expectExceptionCode(1481383888);
435 (new EvaluateDisplayConditions())->addData($input);
436 }
437
438 /**
439 * @test
440 */
441 public function addDataThrowsExceptionIfVersionConditionHasInvalidOperand()
442 {
443 $input = [
444 'databaseRow' => [],
445 'processedTca' => [
446 'columns' => [
447 'field_1' => [
448 'displayCond' => 'VERSION:IS:foo',
449 ],
450 ],
451 ],
452 ];
453 $this->expectException(\RuntimeException::class);
454 $this->expectExceptionCode(1481384123);
455 (new EvaluateDisplayConditions())->addData($input);
456 }
457
458 /**
459 * @test
460 */
461 public function addDataThrowsExceptionIfVersionConditionHasNoUidInDatabaseRow()
462 {
463 $input = [
464 'databaseRow' => [],
465 'processedTca' => [
466 'columns' => [
467 'field_1' => [
468 'displayCond' => 'VERSION:IS:false',
469 ],
470 ],
471 ],
472 ];
473 $this->expectException(\RuntimeException::class);
474 $this->expectExceptionCode(1481469854);
475 (new EvaluateDisplayConditions())->addData($input);
476 }
477
478 /**
479 * @test
480 */
481 public function addDataThrowsExceptionIfUserConditionHasNoUserfuncSpecified()
482 {
483 $input = [
484 'databaseRow' => [],
485 'processedTca' => [
486 'columns' => [
487 'field_1' => [
488 'displayCond' => 'USER',
489 ],
490 ],
491 ],
492 ];
493 $this->expectException(\RuntimeException::class);
494 $this->expectExceptionCode(1481382954);
495 (new EvaluateDisplayConditions())->addData($input);
496 }
497
498 /**
499 * @test
500 */
501 public function addDataEvaluatesUserCondition()
502 {
503 $input = [
504 'databaseRow' => [],
505 'processedTca' => [
506 'columns' => [
507 'field_1' => [
508 'displayCond' => 'USER:' . self::class . '->addDataEvaluatesUserConditionCallback:more:arguments',
509 ],
510 ],
511 ],
512 ];
513 $this->expectException(\RuntimeException::class);
514 $this->expectExceptionCode(1488130499);
515 (new EvaluateDisplayConditions())->addData($input);
516 }
517
518 /**
519 * Callback method of addDataEvaluatesUserCondition. A USER condition
520 * Throws an exception if data is correct!
521 *
522 * @throws \RuntimeException if data is ok
523 */
524 public function addDataEvaluatesUserConditionCallback(array $parameter)
525 {
526 $expected = [
527 'record' => [],
528 'flexformValueKey' => 'vDEF',
529 'conditionParameters' => [
530 0 => 'more',
531 1 => 'arguments',
532 ]
533 ];
534 if ($expected === $parameter) {
535 throw new \RuntimeException('testing', 1488130499);
536 }
537 }
538
539 /**
540 * @test
541 */
542 public function addDataThrowsExceptionIfFlexSheetNameAndFieldNameCombinationsOverlap()
543 {
544 $input = [
545 'databaseRow' => [],
546 'processedTca' => [
547 'columns' => [
548 'field_1' => [
549 'config' => [
550 'type' => 'flex',
551 'ds' => [
552 'sheets' => [
553 'sheet' => [
554 'ROOT' => [
555 'el' => [
556 'name.field' => [],
557 ],
558 ],
559 ],
560 'sheet.name' => [
561 'ROOT' => [
562 'el' => [
563 'field' => [],
564 ],
565 ],
566 ],
567 ],
568 ],
569 ],
570 ],
571 ],
572 ],
573 ];
574 $this->expectException(\RuntimeException::class);
575 $this->expectExceptionCode(1481483061);
576 (new EvaluateDisplayConditions())->addData($input);
577 }
578
579 /**
580 * @test
581 */
582 public function addDataThrowsExceptionIfFlexSheetConditionReferencesFieldFromSameSheet()
583 {
584 $input = [
585 'databaseRow' => [],
586 'processedTca' => [
587 'columns' => [
588 'field_1' => [
589 'config' => [
590 'type' => 'flex',
591 'ds' => [
592 'sheets' => [
593 'aSheet' => [
594 'ROOT' => [
595 'displayCond' => 'FIELD:aSheet.aField:=:foo',
596 'el' => [
597 'aField' => [],
598 ],
599 ],
600 ],
601 ],
602 ],
603 ],
604 ],
605 ],
606 ],
607 ];
608 $this->expectException(\RuntimeException::class);
609 $this->expectExceptionCode(1481485705);
610 (new EvaluateDisplayConditions())->addData($input);
611 }
612
613 /**
614 * @test
615 */
616 public function addDataTrowsExceptionIfFlexFieldSheetConditionReferencesNotExistingFieldValue()
617 {
618 $input = [
619 'databaseRow' => [],
620 'processedTca' => [
621 'columns' => [
622 'field_1' => [
623 'config' => [
624 'type' => 'flex',
625 'ds' => [
626 'sheets' => [
627 'sheet_1' => [],
628 'sheet_2' => [
629 'ROOT' => [
630 'displayCond' => 'FIELD:sheet_1.flexField_1:!=:foo',
631 ],
632 ],
633 ],
634 ],
635 ],
636 ],
637 ],
638 ],
639 ];
640 $this->expectException(\RuntimeException::class);
641 $this->expectExceptionCode(1481488492);
642 (new EvaluateDisplayConditions())->addData($input);
643 }
644
645 /**
646 * @test
647 */
648 public function addDataThrowsExceptionIfFlexFieldFieldConditionReferencesNotExistingFieldValue()
649 {
650 $input = [
651 'databaseRow' => [],
652 'processedTca' => [
653 'columns' => [
654 'field_1' => [
655 'config' => [
656 'type' => 'flex',
657 'ds' => [
658 'sheets' => [
659 'sheet_1' => [
660 'ROOT' => [
661 'el' => [
662 'flexField_1' => [],
663 'flexField_2' => [
664 'displayCond' => 'FIELD:flexField_1:!=:foo',
665 ],
666 ],
667 ],
668 ],
669 ],
670 ],
671 ],
672 ],
673 ],
674 ],
675 ];
676 $this->expectException(\RuntimeException::class);
677 $this->expectExceptionCode(1481492953);
678 (new EvaluateDisplayConditions())->addData($input);
679 }
680
681 /**
682 * @test
683 */
684 public function addDataThrowsExceptionIfFlexFieldReferencingFlexFieldIsNotFoundInFieldValue()
685 {
686 $input = [
687 'databaseRow' => [],
688 'processedTca' => [
689 'columns' => [
690 'field_1' => [
691 'config' => [
692 'type' => 'flex',
693 'ds' => [
694 'sheets' => [
695 'sheet_1' => [
696 'ROOT' => [
697 'el' => [
698 'flexField_1' => [
699 'displayCond' => 'FIELD:foo.flexField_1:!=:foo',
700 ],
701 ],
702 ],
703 ],
704 ],
705 ],
706 ],
707 ],
708 ],
709 ],
710 ];
711 $this->expectException(\RuntimeException::class);
712 $this->expectExceptionCode(1481496170);
713 (new EvaluateDisplayConditions())->addData($input);
714 }
715
716 /**
717 * @test
718 */
719 public function addDataThrowsExceptionIfFlexSectionContainerFoundNoReferencedFieldValue()
720 {
721 $input = [
722 'databaseRow' => [
723 'field_1' => [
724 'data' => [
725 'sheet_1' => [
726 'lDEF' => [
727 'section_1' => [
728 'el' => [
729 '1' => [
730 'container_1' => [],
731 ],
732 ],
733 ],
734 ],
735 ],
736 ],
737 ],
738 ],
739 'processedTca' => [
740 'columns' => [
741 'field_1' => [
742 'config' => [
743 'type' => 'flex',
744 'ds' => [
745 'sheets' => [
746 'sheet_1' => [
747 'ROOT' => [
748 'el' => [
749 'section_1' => [
750 'type' => 'array',
751 'section' => 1,
752 'children' => [
753 '1' => [
754 'el' => [
755 'containerField_1' => [
756 'displayCond' => 'FIELD:flexField_1:!=:foo',
757 ],
758 ],
759 ],
760 ],
761 ],
762 ],
763 ],
764 ],
765 ],
766 ],
767 ],
768 ],
769 ],
770 ]
771 ];
772 $this->expectException(\RuntimeException::class);
773 $this->expectExceptionCode(1481634649);
774 (new EvaluateDisplayConditions())->addData($input);
775 }
776
777 /**
778 * Test scenarios for "a display condition references the value of another field"
779 *
780 * @return array
781 */
782 public function addDataRemovesTcaReferencingOtherFieldsInDisplayConditionDataProvider()
783 {
784 return [
785
786 // tca field to tca field value tests
787 'remove tca field by tca field value' => [
788 // path that should be removed from 'processedTca' by condition
789 'columns/field_2',
790 // 'databaseRow'
791 [
792 'field_1' => 'foo',
793 ],
794 // 'processedTca'
795 [
796 'columns' => [
797 'field_2' => [
798 'displayCond' => 'FIELD:field_1:!=:foo',
799 ],
800 ],
801 ],
802 ],
803
804 // flex field to tca field value tests
805 'remove flex form field by tca field value' => [
806 'columns/field_2/config/ds/sheets/sheet_1/ROOT/el/flexField_1',
807 [
808 'field_1' => 'foo',
809 ],
810 [
811 'columns' => [
812 'field_2' => [
813 'config' => [
814 'type' => 'flex',
815 'ds' => [
816 'sheets' => [
817 'sheet_1' => [
818 'ROOT' => [
819 'el' => [
820 'flexField_1' => [
821 'displayCond' => 'FIELD:parentRec.field_1:!=:foo',
822 ],
823 ],
824 ],
825 ],
826 ],
827 ],
828 ],
829 ],
830 ],
831 ],
832 ],
833
834 // flex field to flex field value on same sheet tests
835 'remove flex form field by flex field value on same flex sheet' => [
836 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/flexField_2',
837 [
838 'field_1' => [
839 'data' => [
840 'sheet_1' => [
841 'lDEF' => [
842 'flexField_1' => [
843 'vDEF' => [
844 0 => 'foo',
845 ],
846 ],
847 ],
848 ],
849 ],
850 ],
851 ],
852 [
853 'columns' => [
854 'field_1' => [
855 'config' => [
856 'type' => 'flex',
857 'ds' => [
858 'sheets' => [
859 'sheet_1' => [
860 'ROOT' => [
861 'el' => [
862 'flexField_1' => [],
863 'flexField_2' => [
864 'displayCond' => 'FIELD:flexField_1:!=:foo',
865 ],
866 ],
867 ],
868 ],
869 ],
870 ],
871 ],
872 ],
873 ],
874 ],
875 ],
876
877 'remove flex form field by flex field value on same flex sheet with dot in flex sheet name' => [
878 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/flexField_2',
879 [
880 'field_1' => [
881 'data' => [
882 'sheet.1' => [
883 'lDEF' => [
884 'flexField_1' => [
885 'vDEF' => [
886 0 => 'foo',
887 ],
888 ],
889 ],
890 ],
891 ],
892 ],
893 ],
894 [
895 'columns' => [
896 'field_1' => [
897 'config' => [
898 'type' => 'flex',
899 'ds' => [
900 'sheets' => [
901 'sheet.1' => [
902 'ROOT' => [
903 'el' => [
904 'flexField_1' => [],
905 'flexField_2' => [
906 'displayCond' => 'FIELD:flexField_1:!=:foo',
907 ],
908 ],
909 ],
910 ],
911 ],
912 ],
913 ],
914 ],
915 ],
916 ],
917 ],
918
919 'remove flex form field by flex field value on same flex sheet with dot in flex field name' => [
920 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/flexField_2',
921 [
922 'field_1' => [
923 'data' => [
924 'sheet_1' => [
925 'lDEF' => [
926 'flexField.1' => [
927 'vDEF' => [
928 0 => 'foo',
929 ],
930 ],
931 ],
932 ],
933 ],
934 ],
935 ],
936 [
937 'columns' => [
938 'field_1' => [
939 'config' => [
940 'type' => 'flex',
941 'ds' => [
942 'sheets' => [
943 'sheet_1' => [
944 'ROOT' => [
945 'el' => [
946 'flexField.1' => [],
947 'flexField_2' => [
948 'displayCond' => 'FIELD:flexField.1:!=:foo',
949 ],
950 ],
951 ],
952 ],
953 ],
954 ],
955 ],
956 ],
957 ],
958 ],
959 ],
960
961 'remove flex form field by flex field value on same flex sheet with dot in flex sheet name and dot in flex field name' => [
962 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/flexField_2',
963 [
964 'field_1' => [
965 'data' => [
966 'sheet.1' => [
967 'lDEF' => [
968 'flexField.1' => [
969 'vDEF' => [
970 0 => 'foo',
971 ],
972 ],
973 ],
974 ],
975 ],
976 ],
977 ],
978 [
979 'columns' => [
980 'field_1' => [
981 'config' => [
982 'type' => 'flex',
983 'ds' => [
984 'sheets' => [
985 'sheet.1' => [
986 'ROOT' => [
987 'el' => [
988 'flexField.1' => [],
989 'flexField_2' => [
990 'displayCond' => 'FIELD:flexField.1:!=:foo',
991 ],
992 ],
993 ],
994 ],
995 ],
996 ],
997 ],
998 ],
999 ],
1000 ],
1001 ],
1002
1003 'remove flex form field by flex field value on same flex sheet with specified flex sheet name' => [
1004 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/flexField_2',
1005 [
1006 'field_1' => [
1007 'data' => [
1008 'sheet_1' => [
1009 'lDEF' => [
1010 'flexField_1' => [
1011 'vDEF' => [
1012 0 => 'foo',
1013 ],
1014 ],
1015 ],
1016 ],
1017 ],
1018 ],
1019 ],
1020 [
1021 'columns' => [
1022 'field_1' => [
1023 'config' => [
1024 'type' => 'flex',
1025 'ds' => [
1026 'sheets' => [
1027 'sheet_1' => [
1028 'ROOT' => [
1029 'el' => [
1030 'flexField_1' => [],
1031 'flexField_2' => [
1032 'displayCond' => 'FIELD:sheet_1.flexField_1:!=:foo',
1033 ],
1034 ],
1035 ],
1036 ],
1037 ],
1038 ],
1039 ],
1040 ],
1041 ],
1042 ],
1043 ],
1044
1045 'remove flex form field by flex field value on same flex sheet with specified flex sheet name with dot in flex sheet name' => [
1046 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/flexField_2',
1047 [
1048 'field_1' => [
1049 'data' => [
1050 'sheet.1' => [
1051 'lDEF' => [
1052 'flexField_1' => [
1053 'vDEF' => [
1054 0 => 'foo',
1055 ],
1056 ],
1057 ],
1058 ],
1059 ],
1060 ],
1061 ],
1062 [
1063 'columns' => [
1064 'field_1' => [
1065 'config' => [
1066 'type' => 'flex',
1067 'ds' => [
1068 'sheets' => [
1069 'sheet.1' => [
1070 'ROOT' => [
1071 'el' => [
1072 'flexField_1' => [],
1073 'flexField_2' => [
1074 'displayCond' => 'FIELD:sheet.1.flexField_1:!=:foo',
1075 ],
1076 ],
1077 ],
1078 ],
1079 ],
1080 ],
1081 ],
1082 ],
1083 ],
1084 ],
1085 ],
1086
1087 'remove flex form field by flex field value on same flex sheet with specified flex sheet name with dot in flex field name' => [
1088 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/flexField_2',
1089 [
1090 'field_1' => [
1091 'data' => [
1092 'sheet_1' => [
1093 'lDEF' => [
1094 'flexField.1' => [
1095 'vDEF' => [
1096 0 => 'foo',
1097 ],
1098 ],
1099 ],
1100 ],
1101 ],
1102 ],
1103 ],
1104 [
1105 'columns' => [
1106 'field_1' => [
1107 'config' => [
1108 'type' => 'flex',
1109 'ds' => [
1110 'sheets' => [
1111 'sheet_1' => [
1112 'ROOT' => [
1113 'el' => [
1114 'flexField.1' => [],
1115 'flexField_2' => [
1116 'displayCond' => 'FIELD:sheet_1.flexField.1:!=:foo',
1117 ],
1118 ],
1119 ],
1120 ],
1121 ],
1122 ],
1123 ],
1124 ],
1125 ],
1126 ],
1127 ],
1128
1129 'remove flex form field by flex field value on same flex sheet with specified flex sheet name with dot in flex sheet name and dot in flex field name' => [
1130 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/flexField_2',
1131 [
1132 'field_1' => [
1133 'data' => [
1134 'sheet.1' => [
1135 'lDEF' => [
1136 'flexField.1' => [
1137 'vDEF' => [
1138 0 => 'foo',
1139 ],
1140 ],
1141 ],
1142 ],
1143 ],
1144 ],
1145 ],
1146 [
1147 'columns' => [
1148 'field_1' => [
1149 'config' => [
1150 'type' => 'flex',
1151 'ds' => [
1152 'sheets' => [
1153 'sheet.1' => [
1154 'ROOT' => [
1155 'el' => [
1156 'flexField.1' => [],
1157 'flexField_2' => [
1158 'displayCond' => 'FIELD:sheet.1.flexField.1:!=:foo',
1159 ],
1160 ],
1161 ],
1162 ],
1163 ],
1164 ],
1165 ],
1166 ],
1167 ],
1168 ],
1169 ],
1170
1171 // flex field to flex field value on other sheet tests
1172 'remove flex form field by flex field value on other flex sheet' => [
1173 'columns/field_1/config/ds/sheets/sheet_2/ROOT/el/flexField_1',
1174 [
1175 'field_1' => [
1176 'data' => [
1177 'sheet_1' => [
1178 'lDEF' => [
1179 'flexField_1' => [
1180 'vDEF' => [
1181 0 => 'foo',
1182 ],
1183 ],
1184 ],
1185 ],
1186 ],
1187 ],
1188 ],
1189 [
1190 'columns' => [
1191 'field_1' => [
1192 'config' => [
1193 'type' => 'flex',
1194 'ds' => [
1195 'sheets' => [
1196 'sheet_1' => [
1197 'ROOT' => [
1198 'el' => [
1199 'flexField_1' => [],
1200 ]
1201 ]
1202 ],
1203 'sheet_2' => [
1204 'ROOT' => [
1205 'el' => [
1206 'flexField_1' => [
1207 'displayCond' => 'FIELD:sheet_1.flexField_1:!=:foo',
1208 ],
1209 ],
1210 ],
1211 ],
1212 ],
1213 ],
1214 ],
1215 ],
1216 ],
1217 ],
1218 ],
1219
1220 'remove flex form field by flex field value on other flex sheet with dot in flex sheet name' => [
1221 'columns/field_1/config/ds/sheets/sheet_2/ROOT/el/flexField_1',
1222 [
1223 'field_1' => [
1224 'data' => [
1225 'sheet.1' => [
1226 'lDEF' => [
1227 'flexField_1' => [
1228 'vDEF' => [
1229 0 => 'foo',
1230 ],
1231 ],
1232 ],
1233 ],
1234 ],
1235 ],
1236 ],
1237 [
1238 'columns' => [
1239 'field_1' => [
1240 'config' => [
1241 'type' => 'flex',
1242 'ds' => [
1243 'sheets' => [
1244 'sheet.1' => [
1245 'ROOT' => [
1246 'el' => [
1247 'flexField_1' => [],
1248 ]
1249 ]
1250 ],
1251 'sheet_2' => [
1252 'ROOT' => [
1253 'el' => [
1254 'flexField_1' => [
1255 'displayCond' => 'FIELD:sheet.1.flexField_1:!=:foo',
1256 ],
1257 ],
1258 ],
1259 ],
1260 ],
1261 ],
1262 ],
1263 ],
1264 ],
1265 ],
1266 ],
1267
1268 'remove flex form field by flex field value on other flex sheet with dot in flex field name' => [
1269 'columns/field_1/config/ds/sheets/sheet_2/ROOT/el/flexField_1',
1270 [
1271 'field_1' => [
1272 'data' => [
1273 'sheet_1' => [
1274 'lDEF' => [
1275 'flexField.1' => [
1276 'vDEF' => [
1277 0 => 'foo',
1278 ],
1279 ],
1280 ],
1281 ],
1282 ],
1283 ],
1284 ],
1285 [
1286 'columns' => [
1287 'field_1' => [
1288 'config' => [
1289 'type' => 'flex',
1290 'ds' => [
1291 'sheets' => [
1292 'sheet_1' => [
1293 'ROOT' => [
1294 'el' => [
1295 'flexField.1' => [],
1296 ]
1297 ]
1298 ],
1299 'sheet_2' => [
1300 'ROOT' => [
1301 'el' => [
1302 'flexField_1' => [
1303 'displayCond' => 'FIELD:sheet_1.flexField.1:!=:foo',
1304 ],
1305 ],
1306 ],
1307 ],
1308 ],
1309 ],
1310 ],
1311 ],
1312 ],
1313 ],
1314 ],
1315
1316 'remove flex form field by flex field value on other flex sheet with dot in flex sheet name and dot in flex field name' => [
1317 'columns/field_1/config/ds/sheets/sheet_2/ROOT/el/flexField_1',
1318 [
1319 'field_1' => [
1320 'data' => [
1321 'sheet.1' => [
1322 'lDEF' => [
1323 'flexField.1' => [
1324 'vDEF' => [
1325 0 => 'foo',
1326 ],
1327 ],
1328 ],
1329 ],
1330 ],
1331 ],
1332 ],
1333 [
1334 'columns' => [
1335 'field_1' => [
1336 'config' => [
1337 'type' => 'flex',
1338 'ds' => [
1339 'sheets' => [
1340 'sheet.1' => [
1341 'ROOT' => [
1342 'el' => [
1343 'flexField.1' => [],
1344 ]
1345 ]
1346 ],
1347 'sheet_2' => [
1348 'ROOT' => [
1349 'el' => [
1350 'flexField_1' => [
1351 'displayCond' => 'FIELD:sheet.1.flexField.1:!=:foo',
1352 ],
1353 ],
1354 ],
1355 ],
1356 ],
1357 ],
1358 ],
1359 ],
1360 ],
1361 ],
1362 ],
1363
1364 // flex sheet to tca field value tests
1365 'remove flex form sheet by tca field value' => [
1366 'columns/field_2/config/ds/sheets/sheet_1',
1367 [
1368 'field_1' => 'foo',
1369 ],
1370 [
1371 'columns' => [
1372 'field_2' => [
1373 'config' => [
1374 'type' => 'flex',
1375 'ds' => [
1376 'sheets' => [
1377 'sheet_1' => [
1378 'ROOT' => [
1379 'displayCond' => 'FIELD:parentRec.field_1:!=:foo',
1380 ],
1381 ],
1382 ],
1383 ],
1384 ],
1385 ],
1386 ],
1387 ],
1388 ],
1389
1390 // flex sheet to flex field value tests
1391 'remove flex form sheet by flex field value on different flex sheet' => [
1392 'columns/field_1/config/ds/sheets/sheet_2',
1393 [
1394 'field_1' => [
1395 'data' => [
1396 'sheet_1' => [
1397 'lDEF' => [
1398 'flexField_1' => [
1399 'vDEF' => [
1400 0 => 'foo',
1401 ],
1402 ],
1403 ],
1404 ],
1405 ],
1406 ],
1407 ],
1408 [
1409 'columns' => [
1410 'field_1' => [
1411 'config' => [
1412 'type' => 'flex',
1413 'ds' => [
1414 'sheets' => [
1415 'sheet_1' => [
1416 'ROOT' => [
1417 'el' => [
1418 'flexField_1' => [],
1419 ],
1420 ],
1421 ],
1422 'sheet_2' => [
1423 'ROOT' => [
1424 'displayCond' => 'FIELD:sheet_1.flexField_1:!=:foo',
1425 ],
1426 ],
1427 ],
1428 ],
1429 ],
1430 ],
1431 ],
1432 ],
1433 ],
1434
1435 'remove flex form sheet by flex field value on different flex sheet with dot in flex sheet name' => [
1436 'columns/field_1/config/ds/sheets/sheet.2',
1437 [
1438 'field_1' => [
1439 'data' => [
1440 'sheet.1' => [
1441 'lDEF' => [
1442 'flexField_1' => [
1443 'vDEF' => [
1444 0 => 'foo',
1445 ],
1446 ],
1447 ],
1448 ],
1449 ],
1450 ],
1451 ],
1452 [
1453 'columns' => [
1454 'field_1' => [
1455 'config' => [
1456 'type' => 'flex',
1457 'ds' => [
1458 'sheets' => [
1459 'sheet.1' => [
1460 'ROOT' => [
1461 'el' => [
1462 'flexField_1' => [],
1463 ],
1464 ],
1465 ],
1466 'sheet.2' => [
1467 'ROOT' => [
1468 'displayCond' => 'FIELD:sheet.1.flexField_1:!=:foo',
1469 ],
1470 ],
1471 ],
1472 ],
1473 ],
1474 ],
1475 ],
1476 ],
1477 ],
1478
1479 'remove flex form sheet by flex field value on different flex sheet with dot in flex field name' => [
1480 'columns/field_1/config/ds/sheets/sheet_2',
1481 [
1482 'field_1' => [
1483 'data' => [
1484 'sheet_1' => [
1485 'lDEF' => [
1486 'flexField.1' => [
1487 'vDEF' => [
1488 0 => 'foo',
1489 ],
1490 ],
1491 ],
1492 ],
1493 ],
1494 ],
1495 ],
1496 [
1497 'columns' => [
1498 'field_1' => [
1499 'config' => [
1500 'type' => 'flex',
1501 'ds' => [
1502 'sheets' => [
1503 'sheet_1' => [
1504 'ROOT' => [
1505 'el' => [
1506 'flexField.1' => [],
1507 ],
1508 ],
1509 ],
1510 'sheet_2' => [
1511 'ROOT' => [
1512 'displayCond' => 'FIELD:sheet_1.flexField.1:!=:foo',
1513 ],
1514 ],
1515 ],
1516 ],
1517 ],
1518 ],
1519 ],
1520 ],
1521 ],
1522
1523 'remove flex form sheet by flex field value on different flex sheet with dot in flex sheet name and dot in flex field name' => [
1524 'columns/field_1/config/ds/sheets/sheet.2',
1525 [
1526 'field_1' => [
1527 'data' => [
1528 'sheet.1' => [
1529 'lDEF' => [
1530 'flexField.1' => [
1531 'vDEF' => [
1532 0 => 'foo',
1533 ],
1534 ],
1535 ],
1536 ],
1537 ],
1538 ],
1539 ],
1540 [
1541 'columns' => [
1542 'field_1' => [
1543 'config' => [
1544 'type' => 'flex',
1545 'ds' => [
1546 'sheets' => [
1547 'sheet.1' => [
1548 'ROOT' => [
1549 'el' => [
1550 'flexField.1' => [],
1551 ],
1552 ],
1553 ],
1554 'sheet.2' => [
1555 'ROOT' => [
1556 'displayCond' => 'FIELD:sheet.1.flexField.1:!=:foo',
1557 ],
1558 ],
1559 ],
1560 ],
1561 ],
1562 ],
1563 ],
1564 ],
1565 ],
1566
1567 // flex section container field to tca value tests
1568 'remove flex section container field by tca field value' => [
1569 'columns/field_2/config/ds/sheets/sheet_1/ROOT/el/section_1/children/1/el/containerField_1',
1570 [
1571 'field_1' => 'foo',
1572 'field_2' => [
1573 'data' => [
1574 'sheet_1' => [
1575 'lDEF' => [
1576 'section_1' => [
1577 'el' => [
1578 '1' => [],
1579 ],
1580 ],
1581 ],
1582 ],
1583 ],
1584 ],
1585 ],
1586 [
1587 'columns' => [
1588 'field_2' => [
1589 'config' => [
1590 'type' => 'flex',
1591 'ds' => [
1592 'sheets' => [
1593 'sheet_1' => [
1594 'ROOT' => [
1595 'el' => [
1596 'section_1' => [
1597 'type' => 'array',
1598 'section' => 1,
1599 'children' => [
1600 '1' => [
1601 'el' => [
1602 'containerField_1' => [
1603 'displayCond' => 'FIELD:parentRec.field_1:!=:foo',
1604 ],
1605 ],
1606 ],
1607 ],
1608 ],
1609 ],
1610 ],
1611 ],
1612 ],
1613 ],
1614 ],
1615 ],
1616 ],
1617 ],
1618 ],
1619
1620 // flex section container field to flex field value of same sheet
1621 'remove flex section container field by flex field value on same flex sheet' => [
1622 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/section_1/children/1/el/containerField_1',
1623 [
1624 'field_1' => [
1625 'data' => [
1626 'sheet_1' => [
1627 'lDEF' => [
1628 'flexField_1' => [
1629 'vDEF' => [
1630 0 => 'foo',
1631 ],
1632 ],
1633 'section_1' => [
1634 'el' => [
1635 '1' => [],
1636 ],
1637 ],
1638 ],
1639 ],
1640 ],
1641 ],
1642 ],
1643 [
1644 'columns' => [
1645 'field_1' => [
1646 'config' => [
1647 'type' => 'flex',
1648 'ds' => [
1649 'sheets' => [
1650 'sheet_1' => [
1651 'ROOT' => [
1652 'el' => [
1653 'flexField_1' => [],
1654 'section_1' => [
1655 'type' => 'array',
1656 'section' => 1,
1657 'children' => [
1658 '1' => [
1659 'el' => [
1660 'containerField_1' => [
1661 'displayCond' => 'FIELD:flexField_1:!=:foo',
1662 ],
1663 ],
1664 ],
1665 ],
1666 ],
1667 ],
1668 ],
1669 ],
1670 ],
1671 ],
1672 ],
1673 ],
1674 ],
1675 ],
1676 ],
1677
1678 'remove flex section container field by flex field value on same flex sheet with dot in flex sheet name' => [
1679 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/section_1/children/1/el/containerField_1',
1680 [
1681 'field_1' => [
1682 'data' => [
1683 'sheet.1' => [
1684 'lDEF' => [
1685 'flexField_1' => [
1686 'vDEF' => [
1687 0 => 'foo',
1688 ],
1689 ],
1690 'section_1' => [
1691 'el' => [
1692 '1' => [],
1693 ],
1694 ],
1695 ],
1696 ],
1697 ],
1698 ],
1699 ],
1700 [
1701 'columns' => [
1702 'field_1' => [
1703 'config' => [
1704 'type' => 'flex',
1705 'ds' => [
1706 'sheets' => [
1707 'sheet.1' => [
1708 'ROOT' => [
1709 'el' => [
1710 'flexField_1' => [],
1711 'section_1' => [
1712 'type' => 'array',
1713 'section' => 1,
1714 'children' => [
1715 '1' => [
1716 'el' => [
1717 'containerField_1' => [
1718 'displayCond' => 'FIELD:flexField_1:!=:foo',
1719 ],
1720 ],
1721 ],
1722 ],
1723 ],
1724 ],
1725 ],
1726 ],
1727 ],
1728 ],
1729 ],
1730 ],
1731 ],
1732 ],
1733 ],
1734
1735 'remove flex section container field by flex field value on same flex sheet with dot in flex field name' => [
1736 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/section_1/children/1/el/containerField_1',
1737 [
1738 'field_1' => [
1739 'data' => [
1740 'sheet_1' => [
1741 'lDEF' => [
1742 'flexField.1' => [
1743 'vDEF' => [
1744 0 => 'foo',
1745 ],
1746 ],
1747 'section_1' => [
1748 'el' => [
1749 '1' => [],
1750 ],
1751 ],
1752 ],
1753 ],
1754 ],
1755 ],
1756 ],
1757 [
1758 'columns' => [
1759 'field_1' => [
1760 'config' => [
1761 'type' => 'flex',
1762 'ds' => [
1763 'sheets' => [
1764 'sheet_1' => [
1765 'ROOT' => [
1766 'el' => [
1767 'flexField.1' => [],
1768 'section_1' => [
1769 'type' => 'array',
1770 'section' => 1,
1771 'children' => [
1772 '1' => [
1773 'el' => [
1774 'containerField_1' => [
1775 'displayCond' => 'FIELD:flexField.1:!=:foo',
1776 ],
1777 ],
1778 ],
1779 ],
1780 ],
1781 ],
1782 ],
1783 ],
1784 ],
1785 ],
1786 ],
1787 ],
1788 ],
1789 ],
1790 ],
1791
1792 'remove flex section container field by flex field value on same flex sheet with dot in flex sheet name and dot in flex field name' => [
1793 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/section_1/children/1/el/containerField_1',
1794 [
1795 'field_1' => [
1796 'data' => [
1797 'sheet.1' => [
1798 'lDEF' => [
1799 'flexField.1' => [
1800 'vDEF' => [
1801 0 => 'foo',
1802 ],
1803 ],
1804 'section_1' => [
1805 'el' => [
1806 '1' => [],
1807 ],
1808 ],
1809 ],
1810 ],
1811 ],
1812 ],
1813 ],
1814 [
1815 'columns' => [
1816 'field_1' => [
1817 'config' => [
1818 'type' => 'flex',
1819 'ds' => [
1820 'sheets' => [
1821 'sheet.1' => [
1822 'ROOT' => [
1823 'el' => [
1824 'flexField.1' => [],
1825 'section_1' => [
1826 'type' => 'array',
1827 'section' => 1,
1828 'children' => [
1829 '1' => [
1830 'el' => [
1831 'containerField_1' => [
1832 'displayCond' => 'FIELD:flexField.1:!=:foo',
1833 ],
1834 ],
1835 ],
1836 ],
1837 ],
1838 ],
1839 ],
1840 ],
1841 ],
1842 ],
1843 ],
1844 ],
1845 ],
1846 ],
1847 ],
1848
1849 'remove flex section container field by flex field value on same flex sheet with specified flex sheet name' => [
1850 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/section_1/children/1/el/containerField_1',
1851 [
1852 'field_1' => [
1853 'data' => [
1854 'sheet_1' => [
1855 'lDEF' => [
1856 'flexField_1' => [
1857 'vDEF' => [
1858 0 => 'foo',
1859 ],
1860 ],
1861 'section_1' => [
1862 'el' => [
1863 '1' => [],
1864 ],
1865 ],
1866 ],
1867 ],
1868 ],
1869 ],
1870 ],
1871 [
1872 'columns' => [
1873 'field_1' => [
1874 'config' => [
1875 'type' => 'flex',
1876 'ds' => [
1877 'sheets' => [
1878 'sheet_1' => [
1879 'ROOT' => [
1880 'el' => [
1881 'flexField_1' => [],
1882 'section_1' => [
1883 'type' => 'array',
1884 'section' => 1,
1885 'children' => [
1886 '1' => [
1887 'el' => [
1888 'containerField_1' => [
1889 'displayCond' => 'FIELD:sheet_1.flexField_1:!=:foo',
1890 ],
1891 ],
1892 ],
1893 ],
1894 ],
1895 ],
1896 ],
1897 ],
1898 ],
1899 ],
1900 ],
1901 ],
1902 ],
1903 ],
1904 ],
1905
1906 'remove flex section container field by flex field value on same flex sheet with specified flex sheet name with dot in flex sheet name' => [
1907 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/section_1/children/1/el/containerField_1',
1908 [
1909 'field_1' => [
1910 'data' => [
1911 'sheet.1' => [
1912 'lDEF' => [
1913 'flexField_1' => [
1914 'vDEF' => [
1915 0 => 'foo',
1916 ],
1917 ],
1918 'section_1' => [
1919 'el' => [
1920 '1' => [],
1921 ],
1922 ],
1923 ],
1924 ],
1925 ],
1926 ],
1927 ],
1928 [
1929 'columns' => [
1930 'field_1' => [
1931 'config' => [
1932 'type' => 'flex',
1933 'ds' => [
1934 'sheets' => [
1935 'sheet.1' => [
1936 'ROOT' => [
1937 'el' => [
1938 'flexField_1' => [],
1939 'section_1' => [
1940 'type' => 'array',
1941 'section' => 1,
1942 'children' => [
1943 '1' => [
1944 'el' => [
1945 'containerField_1' => [
1946 'displayCond' => 'FIELD:sheet.1.flexField_1:!=:foo',
1947 ],
1948 ],
1949 ],
1950 ],
1951 ],
1952 ],
1953 ],
1954 ],
1955 ],
1956 ],
1957 ],
1958 ],
1959 ],
1960 ],
1961 ],
1962
1963 'remove flex section container field by flex field value on same flex sheet with specified flex sheet name with dot in flex field name' => [
1964 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/section_1/children/1/el/containerField_1',
1965 [
1966 'field_1' => [
1967 'data' => [
1968 'sheet_1' => [
1969 'lDEF' => [
1970 'flexField.1' => [
1971 'vDEF' => [
1972 0 => 'foo',
1973 ],
1974 ],
1975 'section_1' => [
1976 'el' => [
1977 '1' => [],
1978 ],
1979 ],
1980 ],
1981 ],
1982 ],
1983 ],
1984 ],
1985 [
1986 'columns' => [
1987 'field_1' => [
1988 'config' => [
1989 'type' => 'flex',
1990 'ds' => [
1991 'sheets' => [
1992 'sheet_1' => [
1993 'ROOT' => [
1994 'el' => [
1995 'flexField.1' => [],
1996 'section_1' => [
1997 'type' => 'array',
1998 'section' => 1,
1999 'children' => [
2000 '1' => [
2001 'el' => [
2002 'containerField_1' => [
2003 'displayCond' => 'FIELD:sheet_1.flexField.1:!=:foo',
2004 ],
2005 ],
2006 ],
2007 ],
2008 ],
2009 ],
2010 ],
2011 ],
2012 ],
2013 ],
2014 ],
2015 ],
2016 ],
2017 ],
2018 ],
2019
2020 'remove flex section container field by flex field value on same flex sheet with specified flex sheet name with dot in flex sheet name and dot in flex field name' => [
2021 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/section_1/children/1/el/containerField_1',
2022 [
2023 'field_1' => [
2024 'data' => [
2025 'sheet.1' => [
2026 'lDEF' => [
2027 'flexField.1' => [
2028 'vDEF' => [
2029 0 => 'foo',
2030 ],
2031 ],
2032 'section_1' => [
2033 'el' => [
2034 '1' => [],
2035 ],
2036 ],
2037 ],
2038 ],
2039 ],
2040 ],
2041 ],
2042 [
2043 'columns' => [
2044 'field_1' => [
2045 'config' => [
2046 'type' => 'flex',
2047 'ds' => [
2048 'sheets' => [
2049 'sheet.1' => [
2050 'ROOT' => [
2051 'el' => [
2052 'flexField.1' => [],
2053 'section_1' => [
2054 'type' => 'array',
2055 'section' => 1,
2056 'children' => [
2057 '1' => [
2058 'el' => [
2059 'containerField_1' => [
2060 'displayCond' => 'FIELD:sheet.1.flexField.1:!=:foo',
2061 ],
2062 ],
2063 ],
2064 ],
2065 ],
2066 ],
2067 ],
2068 ],
2069 ],
2070 ],
2071 ],
2072 ],
2073 ],
2074 ],
2075 ],
2076
2077 // flex section container field to flex field value of other sheet
2078 'remove flex section container field by flex field value on other flex sheet' => [
2079 'columns/field_1/config/ds/sheets/sheet_2/ROOT/el/section_1/children/1/el/containerField_1',
2080 [
2081 'field_1' => [
2082 'data' => [
2083 'sheet_1' => [
2084 'lDEF' => [
2085 'flexField_1' => [
2086 'vDEF' => [
2087 0 => 'foo',
2088 ],
2089 ],
2090 ],
2091 ],
2092 'sheet_2' => [
2093 'lDEF' => [
2094 'section_1' => [
2095 'el' => [
2096 '1' => [],
2097 ],
2098 ],
2099 ],
2100 ],
2101 ],
2102 ],
2103 ],
2104 [
2105 'columns' => [
2106 'field_1' => [
2107 'config' => [
2108 'type' => 'flex',
2109 'ds' => [
2110 'sheets' => [
2111 'sheet_1' => [
2112 'ROOT' => [
2113 'el' => [
2114 'flexField_1' => [],
2115 ],
2116 ],
2117 ],
2118 'sheet_2' => [
2119 'ROOT' => [
2120 'el' => [
2121 'section_1' => [
2122 'type' => 'array',
2123 'section' => 1,
2124 'children' => [
2125 '1' => [
2126 'el' => [
2127 'containerField_1' => [
2128 'displayCond' => 'FIELD:sheet_1.flexField_1:!=:foo',
2129 ],
2130 ],
2131 ],
2132 ],
2133 ],
2134 ],
2135 ],
2136 ],
2137 ],
2138 ],
2139 ],
2140 ],
2141 ],
2142 ],
2143 ],
2144
2145 'remove flex section container field by flex field value on other flex sheet with dot in flex sheet name' => [
2146 'columns/field_1/config/ds/sheets/sheet_2/ROOT/el/section_1/children/1/el/containerField_1',
2147 [
2148 'field_1' => [
2149 'data' => [
2150 'sheet.1' => [
2151 'lDEF' => [
2152 'flexField_1' => [
2153 'vDEF' => [
2154 0 => 'foo',
2155 ],
2156 ],
2157 ],
2158 ],
2159 'sheet_2' => [
2160 'lDEF' => [
2161 'section_1' => [
2162 'el' => [
2163 '1' => [],
2164 ],
2165 ],
2166 ],
2167 ],
2168 ],
2169 ],
2170 ],
2171 [
2172 'columns' => [
2173 'field_1' => [
2174 'config' => [
2175 'type' => 'flex',
2176 'ds' => [
2177 'sheets' => [
2178 'sheet.1' => [
2179 'ROOT' => [
2180 'el' => [
2181 'flexField_1' => [],
2182 ],
2183 ],
2184 ],
2185 'sheet_2' => [
2186 'ROOT' => [
2187 'el' => [
2188 'section_1' => [
2189 'type' => 'array',
2190 'section' => 1,
2191 'children' => [
2192 '1' => [
2193 'el' => [
2194 'containerField_1' => [
2195 'displayCond' => 'FIELD:sheet.1.flexField_1:!=:foo',
2196 ],
2197 ],
2198 ],
2199 ],
2200 ],
2201 ],
2202 ],
2203 ],
2204 ],
2205 ],
2206 ],
2207 ],
2208 ],
2209 ],
2210 ],
2211
2212 'remove flex section container field by flex field value on other flex sheet with dot in flex field name' => [
2213 'columns/field_1/config/ds/sheets/sheet_2/ROOT/el/section_1/children/1/el/containerField_1',
2214 [
2215 'field_1' => [
2216 'data' => [
2217 'sheet_1' => [
2218 'lDEF' => [
2219 'flexField.1' => [
2220 'vDEF' => [
2221 0 => 'foo',
2222 ],
2223 ],
2224 ],
2225 ],
2226 'sheet_2' => [
2227 'lDEF' => [
2228 'section_1' => [
2229 'el' => [
2230 '1' => [],
2231 ],
2232 ],
2233 ],
2234 ],
2235 ],
2236 ],
2237 ],
2238 [
2239 'columns' => [
2240 'field_1' => [
2241 'config' => [
2242 'type' => 'flex',
2243 'ds' => [
2244 'sheets' => [
2245 'sheet_1' => [
2246 'ROOT' => [
2247 'el' => [
2248 'flexField.1' => [],
2249 ],
2250 ],
2251 ],
2252 'sheet_2' => [
2253 'ROOT' => [
2254 'el' => [
2255 'section_1' => [
2256 'type' => 'array',
2257 'section' => 1,
2258 'children' => [
2259 '1' => [
2260 'el' => [
2261 'containerField_1' => [
2262 'displayCond' => 'FIELD:sheet_1.flexField.1:!=:foo',
2263 ],
2264 ],
2265 ],
2266 ],
2267 ],
2268 ],
2269 ],
2270 ],
2271 ],
2272 ],
2273 ],
2274 ],
2275 ],
2276 ],
2277 ],
2278
2279 'remove flex section container field by flex field value on other flex sheet with dot in flex sheet name and dot in flex field name' => [
2280 'columns/field_1/config/ds/sheets/sheet_2/ROOT/el/section_1/children/1/el/containerField_1',
2281 [
2282 'field_1' => [
2283 'data' => [
2284 'sheet.1' => [
2285 'lDEF' => [
2286 'flexField.1' => [
2287 'vDEF' => [
2288 0 => 'foo',
2289 ],
2290 ],
2291 ],
2292 ],
2293 'sheet_2' => [
2294 'lDEF' => [
2295 'section_1' => [
2296 'el' => [
2297 '1' => [],
2298 ],
2299 ],
2300 ],
2301 ],
2302 ],
2303 ],
2304 ],
2305 [
2306 'columns' => [
2307 'field_1' => [
2308 'config' => [
2309 'type' => 'flex',
2310 'ds' => [
2311 'sheets' => [
2312 'sheet.1' => [
2313 'ROOT' => [
2314 'el' => [
2315 'flexField.1' => [],
2316 ],
2317 ],
2318 ],
2319 'sheet_2' => [
2320 'ROOT' => [
2321 'el' => [
2322 'section_1' => [
2323 'type' => 'array',
2324 'section' => 1,
2325 'children' => [
2326 '1' => [
2327 'el' => [
2328 'containerField_1' => [
2329 'displayCond' => 'FIELD:sheet.1.flexField.1:!=:foo',
2330 ],
2331 ],
2332 ],
2333 ],
2334 ],
2335 ],
2336 ],
2337 ],
2338 ],
2339 ],
2340 ],
2341 ],
2342 ],
2343 ],
2344 ],
2345
2346 // flex section container field to flex field value of same container
2347 'remove flex section container field by flex container field value of same container' => [
2348 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/section_1/children/1/el/containerField_2',
2349 [
2350 'field_1' => [
2351 'data' => [
2352 'sheet_1' => [
2353 'lDEF' => [
2354 'section_1' => [
2355 'el' => [
2356 '1' => [
2357 'container_1' => [
2358 'el' => [
2359 'containerField_1' => [
2360 'vDEF' => 'foo',
2361 ],
2362 ],
2363 ],
2364 ],
2365 ],
2366 ],
2367 ],
2368 ],
2369 ],
2370 ],
2371 ],
2372 [
2373 'columns' => [
2374 'field_1' => [
2375 'config' => [
2376 'type' => 'flex',
2377 'ds' => [
2378 'sheets' => [
2379 'sheet_1' => [
2380 'ROOT' => [
2381 'el' => [
2382 'section_1' => [
2383 'type' => 'array',
2384 'section' => 1,
2385 'children' => [
2386 '1' => [
2387 'el' => [
2388 'containerField_1' => [],
2389 'containerField_2' => [
2390 'displayCond' => 'FIELD:containerField_1:!=:foo',
2391 ],
2392 ],
2393 ],
2394 ],
2395 ],
2396 ],
2397 ],
2398 ],
2399 ],
2400 ],
2401 ],
2402 ],
2403 ],
2404 ],
2405 ],
2406
2407 'remove flex section container field by flex container field value of same container with dot in flex sheet name' => [
2408 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/section_1/children/1/el/containerField_2',
2409 [
2410 'field_1' => [
2411 'data' => [
2412 'sheet.1' => [
2413 'lDEF' => [
2414 'section_1' => [
2415 'el' => [
2416 '1' => [
2417 'container_1' => [
2418 'el' => [
2419 'containerField_1' => [
2420 'vDEF' => 'foo',
2421 ],
2422 ],
2423 ],
2424 ],
2425 ],
2426 ],
2427 ],
2428 ],
2429 ],
2430 ],
2431 ],
2432 [
2433 'columns' => [
2434 'field_1' => [
2435 'config' => [
2436 'type' => 'flex',
2437 'ds' => [
2438 'sheets' => [
2439 'sheet.1' => [
2440 'ROOT' => [
2441 'el' => [
2442 'section_1' => [
2443 'type' => 'array',
2444 'section' => 1,
2445 'children' => [
2446 '1' => [
2447 'el' => [
2448 'containerField_1' => [],
2449 'containerField_2' => [
2450 'displayCond' => 'FIELD:containerField_1:!=:foo',
2451 ],
2452 ],
2453 ],
2454 ],
2455 ],
2456 ],
2457 ],
2458 ],
2459 ],
2460 ],
2461 ],
2462 ],
2463 ],
2464 ],
2465 ],
2466
2467 'remove flex section container field by flex container field value of same container with dot in container flex field name' => [
2468 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/section_1/children/1/el/containerField_2',
2469 [
2470 'field_1' => [
2471 'data' => [
2472 'sheet_1' => [
2473 'lDEF' => [
2474 'section_1' => [
2475 'el' => [
2476 '1' => [
2477 'container_1' => [
2478 'el' => [
2479 'containerField.1' => [
2480 'vDEF' => 'foo',
2481 ],
2482 ],
2483 ],
2484 ],
2485 ],
2486 ],
2487 ],
2488 ],
2489 ],
2490 ],
2491 ],
2492 [
2493 'columns' => [
2494 'field_1' => [
2495 'config' => [
2496 'type' => 'flex',
2497 'ds' => [
2498 'sheets' => [
2499 'sheet_1' => [
2500 'ROOT' => [
2501 'el' => [
2502 'section_1' => [
2503 'type' => 'array',
2504 'section' => 1,
2505 'children' => [
2506 '1' => [
2507 'el' => [
2508 'containerField.1' => [],
2509 'containerField_2' => [
2510 'displayCond' => 'FIELD:containerField.1:!=:foo',
2511 ],
2512 ],
2513 ],
2514 ],
2515 ],
2516 ],
2517 ],
2518 ],
2519 ],
2520 ],
2521 ],
2522 ],
2523 ],
2524 ],
2525 ],
2526
2527 'remove flex section container field by flex container field value of same container with dot in flex sheet name and dot in container flex field name' => [
2528 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/section_1/children/1/el/containerField_2',
2529 [
2530 'field_1' => [
2531 'data' => [
2532 'sheet.1' => [
2533 'lDEF' => [
2534 'section_1' => [
2535 'el' => [
2536 '1' => [
2537 'container_1' => [
2538 'el' => [
2539 'containerField.1' => [
2540 'vDEF' => 'foo',
2541 ],
2542 ],
2543 ],
2544 ],
2545 ],
2546 ],
2547 ],
2548 ],
2549 ],
2550 ],
2551 ],
2552 [
2553 'columns' => [
2554 'field_1' => [
2555 'config' => [
2556 'type' => 'flex',
2557 'ds' => [
2558 'sheets' => [
2559 'sheet.1' => [
2560 'ROOT' => [
2561 'el' => [
2562 'section_1' => [
2563 'type' => 'array',
2564 'section' => 1,
2565 'children' => [
2566 '1' => [
2567 'el' => [
2568 'containerField.1' => [],
2569 'containerField_2' => [
2570 'displayCond' => 'FIELD:containerField.1:!=:foo',
2571 ],
2572 ],
2573 ],
2574 ],
2575 ],
2576 ],
2577 ],
2578 ],
2579 ],
2580 ],
2581 ],
2582 ],
2583 ],
2584 ],
2585 ],
2586
2587 'remove flex section container field by flex container field value of same container with specified flex sheet name' => [
2588 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/section_1/children/1/el/containerField_2',
2589 [
2590 'field_1' => [
2591 'data' => [
2592 'sheet_1' => [
2593 'lDEF' => [
2594 'section_1' => [
2595 'el' => [
2596 '1' => [
2597 'container_1' => [
2598 'el' => [
2599 'containerField_1' => [
2600 'vDEF' => 'foo',
2601 ],
2602 ],
2603 ],
2604 ],
2605 ],
2606 ],
2607 ],
2608 ],
2609 ],
2610 ],
2611 ],
2612 [
2613 'columns' => [
2614 'field_1' => [
2615 'config' => [
2616 'type' => 'flex',
2617 'ds' => [
2618 'sheets' => [
2619 'sheet_1' => [
2620 'ROOT' => [
2621 'el' => [
2622 'section_1' => [
2623 'type' => 'array',
2624 'section' => 1,
2625 'children' => [
2626 '1' => [
2627 'el' => [
2628 'containerField_1' => [],
2629 'containerField_2' => [
2630 'displayCond' => 'FIELD:sheet_1.containerField_1:!=:foo',
2631 ],
2632 ],
2633 ],
2634 ],
2635 ],
2636 ],
2637 ],
2638 ],
2639 ],
2640 ],
2641 ],
2642 ],
2643 ],
2644 ],
2645 ],
2646
2647 'remove flex section container field by flex container field value of same container with specified flex sheet name with dot in flex sheet name' => [
2648 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/section_1/children/1/el/containerField_2',
2649 [
2650 'field_1' => [
2651 'data' => [
2652 'sheet.1' => [
2653 'lDEF' => [
2654 'section_1' => [
2655 'el' => [
2656 '1' => [
2657 'container_1' => [
2658 'el' => [
2659 'containerField_1' => [
2660 'vDEF' => 'foo',
2661 ],
2662 ],
2663 ],
2664 ],
2665 ],
2666 ],
2667 ],
2668 ],
2669 ],
2670 ],
2671 ],
2672 [
2673 'columns' => [
2674 'field_1' => [
2675 'config' => [
2676 'type' => 'flex',
2677 'ds' => [
2678 'sheets' => [
2679 'sheet.1' => [
2680 'ROOT' => [
2681 'el' => [
2682 'section_1' => [
2683 'type' => 'array',
2684 'section' => 1,
2685 'children' => [
2686 '1' => [
2687 'el' => [
2688 'containerField_1' => [],
2689 'containerField_2' => [
2690 'displayCond' => 'FIELD:sheet.1.containerField_1:!=:foo',
2691 ],
2692 ],
2693 ],
2694 ],
2695 ],
2696 ],
2697 ],
2698 ],
2699 ],
2700 ],
2701 ],
2702 ],
2703 ],
2704 ],
2705 ],
2706
2707 'remove flex section container field by flex container field value of same container with specified flex sheet name with dot in container flex field name' => [
2708 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/section_1/children/1/el/containerField_2',
2709 [
2710 'field_1' => [
2711 'data' => [
2712 'sheet_1' => [
2713 'lDEF' => [
2714 'section_1' => [
2715 'el' => [
2716 '1' => [
2717 'container_1' => [
2718 'el' => [
2719 'containerField.1' => [
2720 'vDEF' => 'foo',
2721 ],
2722 ],
2723 ],
2724 ],
2725 ],
2726 ],
2727 ],
2728 ],
2729 ],
2730 ],
2731 ],
2732 [
2733 'columns' => [
2734 'field_1' => [
2735 'config' => [
2736 'type' => 'flex',
2737 'ds' => [
2738 'sheets' => [
2739 'sheet_1' => [
2740 'ROOT' => [
2741 'el' => [
2742 'section_1' => [
2743 'type' => 'array',
2744 'section' => 1,
2745 'children' => [
2746 '1' => [
2747 'el' => [
2748 'containerField.1' => [],
2749 'containerField_2' => [
2750 'displayCond' => 'FIELD:sheet_1.containerField.1:!=:foo',
2751 ],
2752 ],
2753 ],
2754 ],
2755 ],
2756 ],
2757 ],
2758 ],
2759 ],
2760 ],
2761 ],
2762 ],
2763 ],
2764 ],
2765 ],
2766
2767 'remove flex section container field by flex container field value of same container with specified flex sheet name with dot in flex sheet name and dot in container flex field name' => [
2768 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/section_1/children/1/el/containerField_2',
2769 [
2770 'field_1' => [
2771 'data' => [
2772 'sheet.1' => [
2773 'lDEF' => [
2774 'section_1' => [
2775 'el' => [
2776 '1' => [
2777 'container_1' => [
2778 'el' => [
2779 'containerField.1' => [
2780 'vDEF' => 'foo',
2781 ],
2782 ],
2783 ],
2784 ],
2785 ],
2786 ],
2787 ],
2788 ],
2789 ],
2790 ],
2791 ],
2792 [
2793 'columns' => [
2794 'field_1' => [
2795 'config' => [
2796 'type' => 'flex',
2797 'ds' => [
2798 'sheets' => [
2799 'sheet.1' => [
2800 'ROOT' => [
2801 'el' => [
2802 'section_1' => [
2803 'type' => 'array',
2804 'section' => 1,
2805 'children' => [
2806 '1' => [
2807 'el' => [
2808 'containerField.1' => [],
2809 'containerField_2' => [
2810 'displayCond' => 'FIELD:sheet.1.containerField.1:!=:foo',
2811 ],
2812 ],
2813 ],
2814 ],
2815 ],
2816 ],
2817 ],
2818 ],
2819 ],
2820 ],
2821 ],
2822 ],
2823 ],
2824 ],
2825 ],
2826
2827 // flex section container field to flex field value of same container with naming clash to flex field value of same sheet
2828 'remove flex section container field by flex container field value of same container with naming clash' => [
2829 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/section_1/children/1/el/field_2',
2830 [
2831 'field_1' => [
2832 'data' => [
2833 'sheet_1' => [
2834 'lDEF' => [
2835 'field_1' => [
2836 'vDEF' => [
2837 0 => 'bar',
2838 ],
2839 ],
2840 'section_1' => [
2841 'el' => [
2842 '1' => [
2843 'container_1' => [
2844 'el' => [
2845 'field_1' => [
2846 'vDEF' => 'foo',
2847 ],
2848 ],
2849 ],
2850 ],
2851 ],
2852 ],
2853 ],
2854 ],
2855 ],
2856 ],
2857 ],
2858 [
2859 'columns' => [
2860 'field_1' => [
2861 'config' => [
2862 'type' => 'flex',
2863 'ds' => [
2864 'sheets' => [
2865 'sheet_1' => [
2866 'ROOT' => [
2867 'el' => [
2868 'section_1' => [
2869 'type' => 'array',
2870 'section' => 1,
2871 'children' => [
2872 '1' => [
2873 'el' => [
2874 'field_1' => [],
2875 'field_2' => [
2876 'displayCond' => 'FIELD:field_1:!=:foo',
2877 ],
2878 ],
2879 ],
2880 ],
2881 ],
2882 ],
2883 ],
2884 ],
2885 ],
2886 ],
2887 ],
2888 ],
2889 ],
2890 ],
2891 ],
2892
2893 'remove flex section container field by flex container field value of same container with naming clash with dot in flex sheet name' => [
2894 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/section_1/children/1/el/field_2',
2895 [
2896 'field_1' => [
2897 'data' => [
2898 'sheet.1' => [
2899 'lDEF' => [
2900 'field_1' => [
2901 'vDEF' => [
2902 0 => 'bar',
2903 ],
2904 ],
2905 'section_1' => [
2906 'el' => [
2907 '1' => [
2908 'container_1' => [
2909 'el' => [
2910 'field_1' => [
2911 'vDEF' => 'foo',
2912 ],
2913 ],
2914 ],
2915 ],
2916 ],
2917 ],
2918 ],
2919 ],
2920 ],
2921 ],
2922 ],
2923 [
2924 'columns' => [
2925 'field_1' => [
2926 'config' => [
2927 'type' => 'flex',
2928 'ds' => [
2929 'sheets' => [
2930 'sheet.1' => [
2931 'ROOT' => [
2932 'el' => [
2933 'section_1' => [
2934 'type' => 'array',
2935 'section' => 1,
2936 'children' => [
2937 '1' => [
2938 'el' => [
2939 'field_1' => [],
2940 'field_2' => [
2941 'displayCond' => 'FIELD:field_1:!=:foo',
2942 ],
2943 ],
2944 ],
2945 ],
2946 ],
2947 ],
2948 ],
2949 ],
2950 ],
2951 ],
2952 ],
2953 ],
2954 ],
2955 ],
2956 ],
2957
2958 'remove flex section container field by flex container field value of same container with naming clash with dot in flex field name' => [
2959 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/section_1/children/1/el/field_2',
2960 [
2961 'field_1' => [
2962 'data' => [
2963 'sheet_1' => [
2964 'lDEF' => [
2965 'field.1' => [
2966 'vDEF' => [
2967 0 => 'bar',
2968 ],
2969 ],
2970 'section_1' => [
2971 'el' => [
2972 '1' => [
2973 'container_1' => [
2974 'el' => [
2975 'field.1' => [
2976 'vDEF' => 'foo',
2977 ],
2978 ],
2979 ],
2980 ],
2981 ],
2982 ],
2983 ],
2984 ],
2985 ],
2986 ],
2987 ],
2988 [
2989 'columns' => [
2990 'field_1' => [
2991 'config' => [
2992 'type' => 'flex',
2993 'ds' => [
2994 'sheets' => [
2995 'sheet_1' => [
2996 'ROOT' => [
2997 'el' => [
2998 'section_1' => [
2999 'type' => 'array',
3000 'section' => 1,
3001 'children' => [
3002 '1' => [
3003 'el' => [
3004 'field.1' => [],
3005 'field_2' => [
3006 'displayCond' => 'FIELD:field.1:!=:foo',
3007 ],
3008 ],
3009 ],
3010 ],
3011 ],
3012 ],
3013 ],
3014 ],
3015 ],
3016 ],
3017 ],
3018 ],
3019 ],
3020 ],
3021 ],
3022
3023 'remove flex section container field by flex container field value of same container with naming clash with dot in flex sheet name and dot in flex field name' => [
3024 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/section_1/children/1/el/field_2',
3025 [
3026 'field_1' => [
3027 'data' => [
3028 'sheet.1' => [
3029 'lDEF' => [
3030 'field.1' => [
3031 'vDEF' => [
3032 0 => 'bar',
3033 ],
3034 ],
3035 'section_1' => [
3036 'el' => [
3037 '1' => [
3038 'container_1' => [
3039 'el' => [
3040 'field.1' => [
3041 'vDEF' => 'foo',
3042 ],
3043 ],
3044 ],
3045 ],
3046 ],
3047 ],
3048 ],
3049 ],
3050 ],
3051 ],
3052 ],
3053 [
3054 'columns' => [
3055 'field_1' => [
3056 'config' => [
3057 'type' => 'flex',
3058 'ds' => [
3059 'sheets' => [
3060 'sheet.1' => [
3061 'ROOT' => [
3062 'el' => [
3063 'section_1' => [
3064 'type' => 'array',
3065 'section' => 1,
3066 'children' => [
3067 '1' => [
3068 'el' => [
3069 'field.1' => [],
3070 'field_2' => [
3071 'displayCond' => 'FIELD:field.1:!=:foo',
3072 ],
3073 ],
3074 ],
3075 ],
3076 ],
3077 ],
3078 ],
3079 ],
3080 ],
3081 ],
3082 ],
3083 ],
3084 ],
3085 ],
3086 ],
3087
3088 'remove flex section container field by flex container field value of same container with naming clash with specified flex sheet name' => [
3089 'columns/field_1/config/ds/sheets/sheet_1/ROOT/el/section_1/children/1/el/field_2',
3090 [
3091 'field_1' => [
3092 'data' => [
3093 'sheet_1' => [
3094 'lDEF' => [
3095 'field_1' => [
3096 'vDEF' => [
3097 0 => 'bar',
3098 ],
3099 ],
3100 'section_1' => [
3101 'el' => [
3102 '1' => [
3103 'container_1' => [
3104 'el' => [
3105 'field_1' => [
3106 'vDEF' => 'foo',
3107 ],
3108 ],
3109 ],
3110 ],
3111 ],
3112 ],
3113 ],
3114 ],
3115 ],
3116 ],
3117 ],
3118 [
3119 'columns' => [
3120 'field_1' => [
3121 'config' => [
3122 'type' => 'flex',
3123 'ds' => [
3124 'sheets' => [
3125 'sheet_1' => [
3126 'ROOT' => [
3127 'el' => [
3128 'section_1' => [
3129 'type' => 'array',
3130 'section' => 1,
3131 'children' => [
3132 '1' => [
3133 'el' => [
3134 'field_1' => [],
3135 'field_2' => [
3136 'displayCond' => 'FIELD:sheet_1.field_1:!=:foo',
3137 ],
3138 ],
3139 ],
3140 ],
3141 ],
3142 ],
3143 ],
3144 ],
3145 ],
3146 ],
3147 ],
3148 ],
3149 ],
3150 ],
3151 ],
3152
3153 'remove flex section container field by flex container field value of same container with naming clash with specified flex sheet name with dot in flex sheet name' => [
3154 'columns/field_1/config/ds/sheets/sheet.1/ROOT/el/section_1/children/1/el/field_2',
3155 [
3156 'field_1' => [
3157 'data' => [
3158 'sheet.1' => [
3159 'lDEF' => [
3160 'field_1' => [
3161 'vDEF' => [
3162 0 => 'bar',
3163 ],
3164 ],
3165 'section_1' => [
3166 'el' => [
3167 '1' => [
3168 'container_1' => [
3169 'el' => [
3170 'field_1' => [
3171 'vDEF' => 'foo',
3172 ],
3173 ],
3174 ],
3175 ],
3176 ],
3177 ],
3178