Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 1
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3declare(strict_types=1);
4
5/** @license For full copyright and license information, please see the LICENSE.md file. */
6
7namespace App\Core\Engine\Application\Navigation;
8
9defined('AMMONLY_APP') || exit('Direct script access is forbidden.');
10
11use App\Core\Engine\Domain\Model\PermissionContext;
12use App\Core\Engine\Domain\Model\RecordNavigationResult;
13use App\Core\Grid\GridRequest;
14
15/**
16 * Record Navigation Service Contract.
17 *
18 * Defines methods for calculating previous and next record transitions and pagination positions.
19 *
20 * @package App\Core\Engine\Application\Navigation
21 */
22interface RecordNavigationServiceInterface
23{
24    /**
25     * Resolves previous and next record IDs and list position for the given record.
26     *
27     * @param string            $moduleName Module machine name.
28     * @param int               $recordId   Current record primary key.
29     * @param GridRequest       $request    Active list filter/sort/page state.
30     * @param PermissionContext $context    Security context.
31     * @param int|null          $filterId   Optional active filter ID.
32     * @return RecordNavigationResult Computed navigation result.
33     */
34    public function resolveNavigation(
35        string            $moduleName,
36        int               $recordId,
37        GridRequest       $request,
38        PermissionContext $context,
39        ?int              $filterId = null,
40    ): RecordNavigationResult;
41}