protected function getRelatedItems(ContentObjectRenderer $parentContentObject)
    {
        list($table, $uid) = explode(':', $parentContentObject->currentRecord);
        $uid = (int) $uid;
        $field = $this->configuration['localField'];

        if (!$this->tcaService->getHasConfigurationForField($table, $field)) {
            return [];
        }

        $overlayUid = $this->frontendOverlayService->getUidOfOverlay($table, $field, $uid);
        $fieldTCA = $this->tcaService->getConfigurationForField($table, $field);

        if (isset($fieldTCA['config']['MM']) && trim($fieldTCA['config']['MM']) !== '') {
            $relatedItems = $this->getRelatedItemsFromMMTable($table, $overlayUid, $fieldTCA);
        } else {
            $relatedItems = $this->getRelatedItemsFromForeignTable($table, $overlayUid, $fieldTCA, $parentContentObject);
        }

        return $relatedItems;
    }
protected function getRelatedItems(ContentObjectRenderer $parentContentObject)
    {
        list($table, $uid) = explode(':', $parentContentObject->currentRecord);
        $uid = (int) $uid;
        $field = $this->configuration['localField'];

        if (!$this->tcaService->getHasConfigurationForField($table, $field)) {
            return [];
        }

        $overlayUid = $this->frontendOverlayService->getUidOfOverlay($table, $field, $uid);
        $fieldTCA = $this->tcaService->getConfigurationForField($table, $field);

        if (isset($fieldTCA['config']['MM']) && trim($fieldTCA['config']['MM']) !== '') {
            $relatedItems = $this->getRelatedItemsFromMMTable($table, $overlayUid, $fieldTCA);
        } else {
            $relatedItems = $this->getRelatedItemsFromForeignTable($table, $overlayUid, $fieldTCA, $parentContentObject);
        }

        return $relatedItems;
    }
protected function getRelatedItems ( ContentObjectRenderer $ parentContentObject ) { list ( $ table , $ uid ) = explode ( ':' , $ parentContentObject -> currentRecord ) ; $ uid = ( int ) $ uid ; $ field = $ this -> configuration [ 'localField' ] ; if ( ! $ this -> tcaService -> getHasConfigurationForField ( $ table , $ field ) ) { return [ ] ; } $ overlayUid = $ this -> frontendOverlayService -> getUidOfOverlay ( $ table , $ field , $ uid ) ; $ fieldTCA = $ this -> tcaService -> getConfigurationForField ( $ table , $ field ) ; if ( isset ( $ fieldTCA [ 'config' ] [ 'MM' ] ) && trim ( $ fieldTCA [ 'config' ] [ 'MM' ] ) !== '' ) { $ relatedItems = $ this -> getRelatedItemsFromMMTable ( $ table , $ overlayUid , $ fieldTCA ) ; } else { $ relatedItems = $ this -> getRelatedItemsFromForeignTable ( $ table , $ overlayUid , $ fieldTCA , $ parentContentObject ) ; } return $ relatedItems ; }
Gets the related items of the current record's configured field.

@param ContentObjectRenderer $parentContentObject parent content object
@return array Array of related items, values already resolved from related records
Gets the related items of the current record s configured field .