protected function getItemRecordOverlayed(Item $item, $language, $systemLanguageContentOverlay)
    {
        $itemRecord = $item->getRecord();

        if ($language > 0) {
            $page = GeneralUtility::makeInstance(PageRepository::class);
            $page->init(false);
            $itemRecord = $page->getRecordOverlay($item->getType(), $itemRecord, $language, $systemLanguageContentOverlay);
        }

        if (!$itemRecord) {
            $itemRecord = null;
        }

        return $itemRecord;
    }
protected function getItemRecordOverlayed(Item $item, $language, $systemLanguageContentOverlay)
    {
        $itemRecord = $item->getRecord();

        if ($language > 0) {
            $page = GeneralUtility::makeInstance(PageRepository::class);
            $page->init(false);
            $itemRecord = $page->getRecordOverlay($item->getType(), $itemRecord, $language, $systemLanguageContentOverlay);
        }

        if (!$itemRecord) {
            $itemRecord = null;
        }

        return $itemRecord;
    }
protected function getItemRecordOverlayed ( Item $ item , $ language , $ systemLanguageContentOverlay ) { $ itemRecord = $ item -> getRecord ( ) ; if ( $ language > 0 ) { $ page = GeneralUtility :: makeInstance ( PageRepository :: class ) ; $ page -> init ( false ) ; $ itemRecord = $ page -> getRecordOverlay ( $ item -> getType ( ) , $ itemRecord , $ language , $ systemLanguageContentOverlay ) ; } if ( ! $ itemRecord ) { $ itemRecord = null ; } return $ itemRecord ; }
Returns the overlayed item record.

@param Item $item
@param int $language
@param string|null $systemLanguageContentOverlay
@return array|mixed|null
Returns the overlayed item record .