@@ -434,6 +434,124 @@ Used to filter field relation Locations from the `Field`_ with the given ``$iden
434
434
| | |
435
435
+----------------------------------------+------------------------------------------------------------------------------------+
436
436
437
+ ``getReverseFieldRelations ``
438
+ ............................
439
+
440
+ Used to get ``$limit `` reverse field relation Content items from the `Field `_ with the given ``$identifier ``. Relations
441
+ will be sorted as is defined by the relation field.
442
+
443
+ +----------------------------------------+------------------------------------------------------------------------------------+
444
+ | **Parameters ** | 1. ``string $identifier `` |
445
+ | | 2. ``int $limit = 25 `` |
446
+ +----------------------------------------+------------------------------------------------------------------------------------+
447
+ | **Returns ** | An array of reverse related `Content `_ items |
448
+ +----------------------------------------+------------------------------------------------------------------------------------+
449
+ | **Sorting method ** | Sorted as is defined by the relation `Field `_ |
450
+ +----------------------------------------+------------------------------------------------------------------------------------+
451
+ | **Example in PHP ** | .. code-block:: php |
452
+ | | |
453
+ | | $relations = $content->getReverseFieldRelations('images', 10); |
454
+ | | |
455
+ +----------------------------------------+------------------------------------------------------------------------------------+
456
+ | **Example in Twig ** | .. code-block:: twig |
457
+ | | |
458
+ | | {% set relations = content.reverseFieldRelations('images') %} |
459
+ | | |
460
+ +----------------------------------------+------------------------------------------------------------------------------------+
461
+
462
+ ``filterReverseFieldRelations ``
463
+ ...............................
464
+
465
+ Used to filter reverse field relation Content items from the `Field `_ with the given ``$identifier ``.
466
+
467
+ +----------------------------------------+------------------------------------------------------------------------------------+
468
+ | **Parameters ** | 1. ``string $identifier `` |
469
+ | | 2. ``array $contentTypeIdentifiers = [] `` |
470
+ | | 3. ``int $maxPerPage = 25 `` |
471
+ | | 4. ``int $currentPage = 1 `` |
472
+ +----------------------------------------+------------------------------------------------------------------------------------+
473
+ | **Returns ** | Pagerfanta instance with reverse related `Content `_ items |
474
+ +----------------------------------------+------------------------------------------------------------------------------------+
475
+ | **Example in PHP ** | .. code-block:: php |
476
+ | | |
477
+ | | $relations = $content->filterReverseFieldRelations( |
478
+ | | 'related_items', |
479
+ | | ['images', 'videos'], |
480
+ | | 10, |
481
+ | | 2 |
482
+ | | ); |
483
+ | | |
484
+ +----------------------------------------+------------------------------------------------------------------------------------+
485
+ | **Example in Twig ** | .. code-block:: twig |
486
+ | | |
487
+ | | {% set relations = content.filterReverseFieldRelations( |
488
+ | | 'related_items' |
489
+ | | ['images', 'videos'] |
490
+ | | 10, |
491
+ | | 2 |
492
+ | | ) %} |
493
+ | | |
494
+ +----------------------------------------+------------------------------------------------------------------------------------+
495
+
496
+ ``getReverseFieldRelationLocations ``
497
+ ....................................
498
+
499
+ Used to get ``$limit `` reverse field relation Locations from the `Field `_ with the given ``$identifier ``. Relations
500
+ will be sorted as is defined by the relation field.
501
+
502
+ +----------------------------------------+------------------------------------------------------------------------------------+
503
+ | **Parameters ** | 1. ``string $identifier `` |
504
+ | | 2. ``int $limit = 25 `` |
505
+ +----------------------------------------+------------------------------------------------------------------------------------+
506
+ | **Returns ** | An array of related `Location `_ items |
507
+ +----------------------------------------+------------------------------------------------------------------------------------+
508
+ | **Sorting method ** | Sorted as is defined by the relation `Field `_ |
509
+ +----------------------------------------+------------------------------------------------------------------------------------+
510
+ | **Example in PHP ** | .. code-block:: php |
511
+ | | |
512
+ | | $relations = $content->getReverseFieldRelationLocations('images', 10); |
513
+ | | |
514
+ +----------------------------------------+------------------------------------------------------------------------------------+
515
+ | **Example in Twig ** | .. code-block:: twig |
516
+ | | |
517
+ | | {% set relations = content.reverseFieldRelationLocations('images') %} |
518
+ | | |
519
+ +----------------------------------------+------------------------------------------------------------------------------------+
520
+
521
+ ``filterReverseFieldRelationLocations ``
522
+ .......................................
523
+
524
+ Used to filter reverse field relation Locations from the `Field `_ with the given ``$identifier ``.
525
+
526
+ +----------------------------------------+------------------------------------------------------------------------------------+
527
+ | **Parameters ** | 1. ``string $identifier `` |
528
+ | | 2. ``array $contentTypeIdentifiers = [] `` |
529
+ | | 3. ``int $maxPerPage = 25 `` |
530
+ | | 4. ``int $currentPage = 1 `` |
531
+ +----------------------------------------+------------------------------------------------------------------------------------+
532
+ | **Returns ** | Pagerfanta instance with reverse related `Location `_ items |
533
+ +----------------------------------------+------------------------------------------------------------------------------------+
534
+ | **Example in PHP ** | .. code-block:: php |
535
+ | | |
536
+ | | $relations = $content->filterReverseFieldRelationLocations( |
537
+ | | 'related_items', |
538
+ | | ['images', 'videos'], |
539
+ | | 10, |
540
+ | | 2 |
541
+ | | ); |
542
+ | | |
543
+ +----------------------------------------+------------------------------------------------------------------------------------+
544
+ | **Example in Twig ** | .. code-block:: twig |
545
+ | | |
546
+ | | {% set relations = content.filterReverseFieldRelationLocations( |
547
+ | | 'related_items' |
548
+ | | ['images', 'videos'] |
549
+ | | 10, |
550
+ | | 2 |
551
+ | | ) %} |
552
+ | | |
553
+ +----------------------------------------+------------------------------------------------------------------------------------+
554
+
437
555
``getPath ``
438
556
...........
439
557
0 commit comments