protected function permissionAccess(string $module, string $function): ?RedirectResponse
    {
        if (!$this->permissionResolver->hasAccess($module, $function)) {
            $this->notificationHandler->error(
                $this->translator->trans(
                    'edgar.ezuicron.permission.failed',
                    [],
                    'edgarezuicron'
                )
            );

            return new RedirectResponse($this->generateUrl('ezplatform.dashboard', []));
        }

        return null;
    }
protected function permissionAccess(string $module, string $function): ?RedirectResponse
    {
        if (!$this->permissionResolver->hasAccess($module, $function)) {
            $this->notificationHandler->error(
                $this->translator->trans(
                    'edgar.ezuicron.permission.failed',
                    [],
                    'edgarezuicron'
                )
            );

            return new RedirectResponse($this->generateUrl('ezplatform.dashboard', []));
        }

        return null;
    }
protected function permissionAccess ( string $ module , string $ function ) : ? RedirectResponse { if ( ! $ this -> permissionResolver -> hasAccess ( $ module , $ function ) ) { $ this -> notificationHandler -> error ( $ this -> translator -> trans ( 'edgar.ezuicron.permission.failed' , [ ] , 'edgarezuicron' ) ) ; return new RedirectResponse ( $ this -> generateUrl ( 'ezplatform.dashboard' , [ ] ) ) ; } return null ; }
Check if user has permissions to access cron functions.

@param string $module
@param string $function

@return null|RedirectResponse
Check if user has permissions to access cron functions .