protected function resolveForeignTableLabelField(array $foreignTableTca)
    {
        $foreignTableLabelField = $foreignTableTca['ctrl']['label'];

        // when foreignLabelField is not enabled we can return directly
        if (empty($this->configuration['foreignLabelField'])) {
            return $foreignTableLabelField;
        }

        if (strpos($this->configuration['foreignLabelField'], '.') !== false) {
            list($foreignTableLabelField) = explode('.', $this->configuration['foreignLabelField'], 2);
        } else {
            $foreignTableLabelField = $this->configuration['foreignLabelField'];
        }

        return $foreignTableLabelField;
    }
protected function resolveForeignTableLabelField(array $foreignTableTca)
    {
        $foreignTableLabelField = $foreignTableTca['ctrl']['label'];

        // when foreignLabelField is not enabled we can return directly
        if (empty($this->configuration['foreignLabelField'])) {
            return $foreignTableLabelField;
        }

        if (strpos($this->configuration['foreignLabelField'], '.') !== false) {
            list($foreignTableLabelField) = explode('.', $this->configuration['foreignLabelField'], 2);
        } else {
            $foreignTableLabelField = $this->configuration['foreignLabelField'];
        }

        return $foreignTableLabelField;
    }
protected function resolveForeignTableLabelField ( array $ foreignTableTca ) { $ foreignTableLabelField = $ foreignTableTca [ 'ctrl' ] [ 'label' ] ; // when foreignLabelField is not enabled we can return directly if ( empty ( $ this -> configuration [ 'foreignLabelField' ] ) ) { return $ foreignTableLabelField ; } if ( strpos ( $ this -> configuration [ 'foreignLabelField' ] , '.' ) !== false ) { list ( $ foreignTableLabelField ) = explode ( '.' , $ this -> configuration [ 'foreignLabelField' ] , 2 ) ; } else { $ foreignTableLabelField = $ this -> configuration [ 'foreignLabelField' ] ; } return $ foreignTableLabelField ; }
Resolves the field to use as the related item's label depending on TCA
and TypoScript configuration

@param array $foreignTableTca The foreign table's TCA
@return string The field to use for the related item's label
Resolves the field to use as the related item s label depending on TCA and TypoScript configuration