protected function getAccessGroupsFromContent(Item $item, $language = 0)
    {
        static $accessGroupsCache;

        $accessGroupsCacheEntryId = $item->getRecordUid() . '|' . $language;
        if (!isset($accessGroupsCache[$accessGroupsCacheEntryId])) {
            $request = $this->buildBasePageIndexerRequest();
            $request->setIndexQueueItem($item);
            $request->addAction('findUserGroups');

            $indexRequestUrl = $this->getDataUrl($item, $language);
            $response = $request->send($indexRequestUrl);

            $groups = $response->getActionResult('findUserGroups');
            if (is_array($groups)) {
                $accessGroupsCache[$accessGroupsCacheEntryId] = $groups;
            }

            if ($this->loggingEnabled) {
                $this->logger->log(
                    SolrLogManager::INFO,
                    'Page Access Groups',
                    [
                        'item' => (array)$item,
                        'language' => $language,
                        'index request url' => $indexRequestUrl,
                        'request' => (array)$request,
                        'response' => (array)$response,
                        'groups' => $groups
                    ]
                );
            }
        }

        return $accessGroupsCache[$accessGroupsCacheEntryId];
    }
protected function getAccessGroupsFromContent(Item $item, $language = 0)
    {
        static $accessGroupsCache;

        $accessGroupsCacheEntryId = $item->getRecordUid() . '|' . $language;
        if (!isset($accessGroupsCache[$accessGroupsCacheEntryId])) {
            $request = $this->buildBasePageIndexerRequest();
            $request->setIndexQueueItem($item);
            $request->addAction('findUserGroups');

            $indexRequestUrl = $this->getDataUrl($item, $language);
            $response = $request->send($indexRequestUrl);

            $groups = $response->getActionResult('findUserGroups');
            if (is_array($groups)) {
                $accessGroupsCache[$accessGroupsCacheEntryId] = $groups;
            }

            if ($this->loggingEnabled) {
                $this->logger->log(
                    SolrLogManager::INFO,
                    'Page Access Groups',
                    [
                        'item' => (array)$item,
                        'language' => $language,
                        'index request url' => $indexRequestUrl,
                        'request' => (array)$request,
                        'response' => (array)$response,
                        'groups' => $groups
                    ]
                );
            }
        }

        return $accessGroupsCache[$accessGroupsCacheEntryId];
    }
protected function getAccessGroupsFromContent ( Item $ item , $ language = 0 ) { static $ accessGroupsCache ; $ accessGroupsCacheEntryId = $ item -> getRecordUid ( ) . '|' . $ language ; if ( ! isset ( $ accessGroupsCache [ $ accessGroupsCacheEntryId ] ) ) { $ request = $ this -> buildBasePageIndexerRequest ( ) ; $ request -> setIndexQueueItem ( $ item ) ; $ request -> addAction ( 'findUserGroups' ) ; $ indexRequestUrl = $ this -> getDataUrl ( $ item , $ language ) ; $ response = $ request -> send ( $ indexRequestUrl ) ; $ groups = $ response -> getActionResult ( 'findUserGroups' ) ; if ( is_array ( $ groups ) ) { $ accessGroupsCache [ $ accessGroupsCacheEntryId ] = $ groups ; } if ( $ this -> loggingEnabled ) { $ this -> logger -> log ( SolrLogManager :: INFO , 'Page Access Groups' , [ 'item' => ( array ) $ item , 'language' => $ language , 'index request url' => $ indexRequestUrl , 'request' => ( array ) $ request , 'response' => ( array ) $ response , 'groups' => $ groups ] ) ; } } return $ accessGroupsCache [ $ accessGroupsCacheEntryId ] ; }
Finds the FE user groups used on a page including all groups of content
elements and groups of records of extensions that have correctly been
pushed through ContentObjectRenderer during rendering.

@param Item $item Index queue item representing the current page to get the user groups from
@param int $language The sys_language_uid language ID
@return array Array of user group IDs
Finds the FE user groups used on a page including all groups of content elements and groups of records of extensions that have correctly been pushed through ContentObjectRenderer during rendering .