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