src/CRUDlex/Controller.php
protected function getAfterDeleteRedirectParameters(Request $request, $entity, &$redirectPage)
    {
        $redirectPage       = 'crudList';
        $redirectParameters = ['entity' => $entity];
        $redirectEntity     = $request->get('redirectEntity');
        $redirectId         = $request->get('redirectId');
        if ($redirectEntity && $redirectId) {
            $redirectPage       = 'crudShow';
            $redirectParameters = [
                'entity' => $redirectEntity,
                'id' => $redirectId
            ];
        }
        return $redirectParameters;
    }
protected function getAfterDeleteRedirectParameters(Request $request, $entity, &$redirectPage)
    {
        $redirectPage       = 'crudList';
        $redirectParameters = ['entity' => $entity];
        $redirectEntity     = $request->get('redirectEntity');
        $redirectId         = $request->get('redirectId');
        if ($redirectEntity && $redirectId) {
            $redirectPage       = 'crudShow';
            $redirectParameters = [
                'entity' => $redirectEntity,
                'id' => $redirectId
            ];
        }
        return $redirectParameters;
    }
protected function getAfterDeleteRedirectParameters ( Request $ request , $ entity , & $ redirectPage ) { $ redirectPage = 'crudList' ; $ redirectParameters = [ 'entity' => $ entity ] ; $ redirectEntity = $ request -> get ( 'redirectEntity' ) ; $ redirectId = $ request -> get ( 'redirectId' ) ; if ( $ redirectEntity && $ redirectId ) { $ redirectPage = 'crudShow' ; $ redirectParameters = [ 'entity' => $ redirectEntity , 'id' => $ redirectId ] ; } return $ redirectParameters ; }
Gets the parameters for the redirection after deleting an entity.

@param Request $request
the current request
@param string $entity
the entity name
@param string $redirectPage
reference, where the page to redirect to will be stored

@return array<string,string>
the parameters of the redirection, entity and id
Gets the parameters for the redirection after deleting an entity .