public function cObjGetSingleExt(
        /** @noinspection PhpUnusedParameterInspection */ $name,
        array $configuration,
        /** @noinspection PhpUnusedParameterInspection */ $TyposcriptKey,
        $contentObject
    ) {
        $data = '';
        if (isset($configuration['value'])) {
            $data = $configuration['value'];
            unset($configuration['value']);
        }

        if (!empty($configuration)) {
            $data = $contentObject->stdWrap($data, $configuration);
        }

        if (!array_key_exists('separator', $configuration)) {
            $configuration['separator'] = ',';
        }

        $removeEmptyValues = true;
        if (isset($configuration['removeEmptyValues']) && $configuration['removeEmptyValues'] == 0) {
            $removeEmptyValues = false;
        }

        $listAsArray = GeneralUtility::trimExplode(
            $configuration['separator'],
            $data,
            $removeEmptyValues
        );

        if (!empty($configuration['removeDuplicateValues'])) {
            $listAsArray = array_unique($listAsArray);
        }

        return serialize($listAsArray);
    }
public function cObjGetSingleExt(
        /** @noinspection PhpUnusedParameterInspection */ $name,
        array $configuration,
        /** @noinspection PhpUnusedParameterInspection */ $TyposcriptKey,
        $contentObject
    ) {
        $data = '';
        if (isset($configuration['value'])) {
            $data = $configuration['value'];
            unset($configuration['value']);
        }

        if (!empty($configuration)) {
            $data = $contentObject->stdWrap($data, $configuration);
        }

        if (!array_key_exists('separator', $configuration)) {
            $configuration['separator'] = ',';
        }

        $removeEmptyValues = true;
        if (isset($configuration['removeEmptyValues']) && $configuration['removeEmptyValues'] == 0) {
            $removeEmptyValues = false;
        }

        $listAsArray = GeneralUtility::trimExplode(
            $configuration['separator'],
            $data,
            $removeEmptyValues
        );

        if (!empty($configuration['removeDuplicateValues'])) {
            $listAsArray = array_unique($listAsArray);
        }

        return serialize($listAsArray);
    }
public function cObjGetSingleExt ( /** @noinspection PhpUnusedParameterInspection */ $ name , array $ configuration , /** @noinspection PhpUnusedParameterInspection */ $ TyposcriptKey , $ contentObject ) { $ data = '' ; if ( isset ( $ configuration [ 'value' ] ) ) { $ data = $ configuration [ 'value' ] ; unset ( $ configuration [ 'value' ] ) ; } if ( ! empty ( $ configuration ) ) { $ data = $ contentObject -> stdWrap ( $ data , $ configuration ) ; } if ( ! array_key_exists ( 'separator' , $ configuration ) ) { $ configuration [ 'separator' ] = ',' ; } $ removeEmptyValues = true ; if ( isset ( $ configuration [ 'removeEmptyValues' ] ) && $ configuration [ 'removeEmptyValues' ] == 0 ) { $ removeEmptyValues = false ; } $ listAsArray = GeneralUtility :: trimExplode ( $ configuration [ 'separator' ] , $ data , $ removeEmptyValues ) ; if ( ! empty ( $ configuration [ 'removeDuplicateValues' ] ) ) { $ listAsArray = array_unique ( $ listAsArray ) ; } return serialize ( $ listAsArray ) ; }
Executes the SOLR_MULTIVALUE content object.

Turns a list of values into an array that can then be used to fill
multivalued fields in a Solr document. The array is returned in
serialized form as content objects are expected to return strings.

@param string $name content object name 'SOLR_MULTIVALUE'
@param array $configuration for the content object, expects keys 'separator' and 'field'
@param string $TyposcriptKey not used
@param \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $contentObject parent cObj
@return string serialized array representation of the given list
Executes the SOLR_MULTIVALUE content object .