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