Classes/ViewHelpers/ResultViewHelper.php
protected function appendMarkupForFieldToContainer($fieldName, $result, $container, $prepend = '', $append = '')
    {
        $span = null;
        $fieldContent = $result['md-' . $fieldName][0]['values'][0];

        if ($fieldContent && $container) {
            $span = $this->doc->createElement('span');
            $span->setAttribute('class', 'pz2-' . $fieldName);
            $span->appendChild($this->doc->createTextNode($fieldContent));

            if ($prepend != '') {
                $container->appendChild($this->doc->createTextNode($prepend));
            }

            $container->appendChild($span);

            if ($append != '') {
                $container->appendChild($this->doc->createTextNode($append));
            }
        }

        return $span;
    }
protected function appendMarkupForFieldToContainer($fieldName, $result, $container, $prepend = '', $append = '')
    {
        $span = null;
        $fieldContent = $result['md-' . $fieldName][0]['values'][0];

        if ($fieldContent && $container) {
            $span = $this->doc->createElement('span');
            $span->setAttribute('class', 'pz2-' . $fieldName);
            $span->appendChild($this->doc->createTextNode($fieldContent));

            if ($prepend != '') {
                $container->appendChild($this->doc->createTextNode($prepend));
            }

            $container->appendChild($span);

            if ($append != '') {
                $container->appendChild($this->doc->createTextNode($append));
            }
        }

        return $span;
    }
protected function appendMarkupForFieldToContainer ( $ fieldName , $ result , $ container , $ prepend = '' , $ append = '' ) { $ span = null ; $ fieldContent = $ result [ 'md-' . $ fieldName ] [ 0 ] [ 'values' ] [ 0 ] ; if ( $ fieldContent && $ container ) { $ span = $ this -> doc -> createElement ( 'span' ) ; $ span -> setAttribute ( 'class' , 'pz2-' . $ fieldName ) ; $ span -> appendChild ( $ this -> doc -> createTextNode ( $ fieldContent ) ) ; if ( $ prepend != '' ) { $ container -> appendChild ( $ this -> doc -> createTextNode ( $ prepend ) ) ; } $ container -> appendChild ( $ span ) ; if ( $ append != '' ) { $ container -> appendChild ( $ this -> doc -> createTextNode ( $ append ) ) ; } } return $ span ; }
Creates span DOM element and content for a field name; Appends it to the given container.
@param string $fieldName
@param string $result result array to look the fieldName up in
@param \DOMElement $container
@param string $prepend
@param string $append
@return \DOMElement
Creates span DOM element and content for a field name ; Appends it to the given container .