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