Returns a single resource

@return string|null admin output to display or null for redirecting to the list
345824
public function get()
	{
		$view = $this->getView();
		$context = $this->getContext();

		try
		{
			if( ( $id = $view->param( 'id' ) ) === null ) {
				throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Required parameter "%1$s" is missing', 'id' ) );
			}

			$fs = $context->getFileSystemManager()->get( 'fs-admin' );
			$item = \Aimeos\MAdmin::create( $context, 'job' )->getItem( $id );
			$result = $item->getResult();

			if( isset( $result['file'] ) && $fs->has( $result['file'] ) )
			{
				$stream = $view->response()->createStream( $fs->reads( $result['file'] ) );
				$view->response()->withHeader( 'Content-Disposition', 'attachment; filename="' . $result['file'] . '"' );
				$view->response()->withHeader( 'Content-Type', 'text/csv' );
				$view->response()->withBody( $stream );
			}
		}
		catch( \Aimeos\MAdmin\Exception $e )
		{
			$error = array( 'job-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
			$view->errors = $view->get( 'errors', [] ) + $error;
			$this->logException( $e );
		}
		catch( \Exception $e )
		{
			$error = array( 'job-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
			$view->errors = $view->get( 'errors', [] ) + $error;
			$this->logException( $e );
		}
	}
497618
public function getContents()
    {
        if ($this->resource === null) {
            return '';
        }

        $result = substr($this->resource, $this->pointer);

        if ($result === false) {
            return '';
        }

        return $result;
    }
790385
public function detach()
    {
        $resource = $this->resource;

        $this->resource = null;
        $this->stream = null;

        return $resource;
    }
208711
private function getResourceOnly()
    {
        $name = $this->getArgumentResource();
        if (!str_contains($name, '.')) {
            return $name;
        }

        return substr($name, strripos($name, '.') + 1);
    }
478638
public function getRequestUri()
    {
        if ($this->requestUri === null) {
            $this->requestUri = $this->getServer('REQUEST_URI');
        }
        return $this->requestUri;
    }
687767
public function get(
        $root = null,
        $siteId = null,
        $pages = null,
        $pageType = null,
        $pageName = null
    ) {
        if (empty($root)) {
            $root = self::RESOURCE_SITES;
        }

        if (empty($siteId)) {
            return $root;
        }

        if (empty($pages)) {
            return $root . '.' . $siteId;
        }

        if (empty($pageType) || empty($pageName)) {
            return $root . '.' . $siteId . '.' . $pages;
        }

        return $root . '.' . $siteId . '.' . $pages . '.' . $pageType . '.' . $pageName;
    }
189138
public function getSLOurl()
    {
        $url = null;
        $idpData = $this->_settings->getIdPData();
        if (isset($idpData['singleLogoutService']) && isset($idpData['singleLogoutService']['url'])) {
            $url = $idpData['singleLogoutService']['url'];
        }
        return $url;
    }
215744
protected function getForeignResource()
    {
        $modelName = $this->getForeignModelName();
        // Find the resource file from the resource-map or make a standard name.
        $resourceFile = ResourceMapper::pluckFirst($modelName) ?: Helpers::makeJsonFileName($modelName);

        if (File::exists(Config::getResourceFilePath($resourceFile))) {
            return Resource::fromFile($resourceFile, 'crestapps');
        }

        return null;
    }
1230564
public function getRequestUri()
    {
        if ($this->requestUri === null) {
            $this->requestUri = $this->detectRequestUri();
        }
        return $this->requestUri;
    }
998313
protected function getResourcesSubUrl(): string
    {
        if ($this->subUrl === null) {
            $this->subUrl = '/' . $this->getType();
        }

        return $this->subUrl;
    }
503822
public function fetch()
    {
        if ($this->resourceHandle !== null) {
            if (($row = $this->resourceHandle->fetch(\PDO::FETCH_ASSOC)) === false) {
                $this->freeResult();
            }

            return $row;
        }

        return false;
    }
1171314
public function getRequestTarget()
    {
        if ($this->requestTarget !== null) {
            return $this->requestTarget;
        }

        if (!$this->uri) {
            return '/';
        }

        $requestTarget = $this->getUri()->getPath();
        if ($query = $this->getUri()->getQuery()) {
            $requestTarget .= sprintf('?%s', $query);
        }

        return empty($requestTarget) ? '/' : $requestTarget;
    }
203844
public function getSource()
    {
        if ($this->source) {
            return $this->source;
        }
        
        if ($this->owner->ListSourceID) {
            return $this->owner->ListSource();
        }
    }
533639
public static function getURI() {
        if (isset($_SERVER ['REQUEST_URI'])) {
            if (WWWROOT_DIR != '/') {
                $uri = substr($_SERVER ['REQUEST_URI'], strlen(WWWROOT_DIR) - 1);
            } else {
                $uri = $_SERVER ['REQUEST_URI'];
            }

            return $uri;
        }

        return null;
    }
467757
public function getSafeUri()
    {
        static $safe = array(
            '%2F' => '/',
            '%2f' => '/',
        );

        if ( empty( $this->uri ) )
        {
            return null;
        }

        return strtr( rawurlencode( $this->uri ), $safe );
    }
327234
public function listAction()
    {
        $request = $this->getRequest();

        $this->admin->checkAccess('list');

        $preResponse = $this->preList($request);
        if (null !== $preResponse) {
            return $preResponse;
        }

        if ($listMode = $request->get('_list_mode')) {
            $this->admin->setListMode($listMode);
        }

        $datagrid = $this->admin->getDatagrid();
        $formView = $datagrid->getForm()->createView();

        // set the theme for the current Admin Form
        $this->setFormTheme($formView, $this->admin->getFilterTheme());

        // NEXT_MAJOR: Remove this line and use commented line below it instead
        $template = $this->admin->getTemplate('list');
        // $template = $this->templateRegistry->getTemplate('list');

        return $this->renderWithExtraParams($template, [
            'action' => 'list',
            'form' => $formView,
            'datagrid' => $datagrid,
            'csrf_token' => $this->getCsrfToken('sonata.batch'),
            'export_formats' => $this->has('sonata.admin.admin_exporter') ?
                $this->get('sonata.admin.admin_exporter')->getAvailableFormats($this->admin) :
                $this->admin->getExportFormats(),
        ], null);
    }
718001
public function getAdminWrapperAction()
    {
        $allowed = $this->cmsPermissionChecks->siteAdminCheck($this->currentSite);

        if (!$allowed) {
            return null;
        }

        /** @var RouteMatch $routeMatch */
        $routeMatch = $this->getEvent()->getRouteMatch();
        $siteId = $this->currentSite->getSiteId();
        $sourcePageName = $routeMatch->getParam('page', 'index');

        if ($sourcePageName instanceof Page) {
            $sourcePageName = $sourcePageName->getName();
        }

        $pageType = $routeMatch->getParam('pageType', 'n');

        $view = new ViewModel();
        $view->setVariable('restrictions', false);
        if ($this->cmsPermissionChecks->isPageRestricted($siteId, $pageType, $sourcePageName, 'read') == true) {
            $view->setVariable('restrictions', true);
        }

        $view->setVariable('adminMenu', $this->adminPanelConfig);
        $view->setTemplate('rcm-admin/admin/admin');

        return $view;
    }