src/Item.php
public function parseValue($strOutputFormat = 'text', $objSettings = null)
    {
        $this->registerAssets($objSettings);

        $arrResult = [
            'raw'            => $this->arrData,
            'text'           => [],
            'attributes'     => [],
            $strOutputFormat => [],
            'class'          => '',
            'actions'        => []
        ];

        // No render settings, parse "normal" and hope the best - not all attribute types must provide usable output.
        if (!$objSettings) {
            foreach ($this->getMetaModel()->getAttributes() as $objAttribute) {
                $arrResult['attributes'][$objAttribute->getColName()] = $objAttribute->getName();
                foreach ($this->internalParseAttribute($objAttribute, $strOutputFormat, null) as $strKey => $varValue) {
                    $arrResult[$strKey][$objAttribute->getColName()] = $varValue;
                }
            }
            return $arrResult;
        }

        // Add jumpTo link
        $jumpTo = $this->buildJumpToLink($objSettings);
        if (true === $jumpTo['deep']) {
            $arrResult['actions']['jumpTo'] = [
                'href'  => $jumpTo['url'],
                'label' => $this->getCaptionText('details'),
                'class' => 'details'
            ];
        }

        // Just here for backwards compatibility with templates. See #1087
        $arrResult['jumpTo'] = $jumpTo;

        // First, parse the values in the same order as they are in the render settings.
        foreach ($objSettings->getSettingNames() as $strAttrName) {
            $objAttribute = $this->getMetaModel()->getAttribute($strAttrName);
            if ($objAttribute) {
                $arrResult['attributes'][$objAttribute->getColName()] = $objAttribute->getName();
                foreach ($this->internalParseAttribute(
                    $objAttribute,
                    $strOutputFormat,
                    $objSettings
                ) as $strKey => $varValue) {
                    $arrResult[$strKey][$objAttribute->getColName()] = $varValue;
                }
            }
        }

        // Add css classes, i.e. for the frontend editing list.
        if ($this->getMetaModel()->hasVariants()) {
            $arrResult['class'] = $this->variantCssClass();
        }

        // Trigger event to allow other extensions to manipulate the parsed data.
        $event = new ParseItemEvent($objSettings, $this, $strOutputFormat, $arrResult);
        $this->getEventDispatcher()->dispatch(MetaModelsEvents::PARSE_ITEM, $event);

        return $event->getResult();
    }
public function parseValue($strOutputFormat = 'text', $objSettings = null)
    {
        $this->registerAssets($objSettings);

        $arrResult = [
            'raw'            => $this->arrData,
            'text'           => [],
            'attributes'     => [],
            $strOutputFormat => [],
            'class'          => '',
            'actions'        => []
        ];

        // No render settings, parse "normal" and hope the best - not all attribute types must provide usable output.
        if (!$objSettings) {
            foreach ($this->getMetaModel()->getAttributes() as $objAttribute) {
                $arrResult['attributes'][$objAttribute->getColName()] = $objAttribute->getName();
                foreach ($this->internalParseAttribute($objAttribute, $strOutputFormat, null) as $strKey => $varValue) {
                    $arrResult[$strKey][$objAttribute->getColName()] = $varValue;
                }
            }
            return $arrResult;
        }

        // Add jumpTo link
        $jumpTo = $this->buildJumpToLink($objSettings);
        if (true === $jumpTo['deep']) {
            $arrResult['actions']['jumpTo'] = [
                'href'  => $jumpTo['url'],
                'label' => $this->getCaptionText('details'),
                'class' => 'details'
            ];
        }

        // Just here for backwards compatibility with templates. See #1087
        $arrResult['jumpTo'] = $jumpTo;

        // First, parse the values in the same order as they are in the render settings.
        foreach ($objSettings->getSettingNames() as $strAttrName) {
            $objAttribute = $this->getMetaModel()->getAttribute($strAttrName);
            if ($objAttribute) {
                $arrResult['attributes'][$objAttribute->getColName()] = $objAttribute->getName();
                foreach ($this->internalParseAttribute(
                    $objAttribute,
                    $strOutputFormat,
                    $objSettings
                ) as $strKey => $varValue) {
                    $arrResult[$strKey][$objAttribute->getColName()] = $varValue;
                }
            }
        }

        // Add css classes, i.e. for the frontend editing list.
        if ($this->getMetaModel()->hasVariants()) {
            $arrResult['class'] = $this->variantCssClass();
        }

        // Trigger event to allow other extensions to manipulate the parsed data.
        $event = new ParseItemEvent($objSettings, $this, $strOutputFormat, $arrResult);
        $this->getEventDispatcher()->dispatch(MetaModelsEvents::PARSE_ITEM, $event);

        return $event->getResult();
    }
Renders the item in the given output format.

@param string      $strOutputFormat The desired output format (optional - default: text).

@param ICollection $objSettings     The render settings to use (optional - default: null).

@return array attribute name => format => value