public function main($content, $conf)
    {
        $this->templateService = GeneralUtility::makeInstance(MarkerBasedTemplateService::class);
        $this->init($conf);
        $singleSelection = $this->getSingleRecords();
        $groupSelection = $this->getRecordsFromGroups();

        $templateCode = $this->getTemplate();

        // apply sorting
        $addresses = $this->sortAddresses($singleSelection, $groupSelection);

        // limit output to max listMaxItems addresses
        if (((int)$this->conf['listMaxItems']) > 0) {
            $addresses = array_slice($addresses, 0, (int)$this->conf['listMaxItems']);
        }

        // output
        foreach ($addresses as $address) {
            if (!empty($address)) {
                $markerArray = $this->getItemMarkerArray($address);
                $subpartArray = $this->getSubpartArray($templateCode, $markerArray, $address);

                $addressContent = $this->templateService->substituteMarkerArrayCached(
                    $templateCode,
                    $markerArray,
                    $subpartArray
                );

                $wrap = $this->conf['templates.'][$this->conf['templateName'] . '.']['wrap'];
                $content .= $this->cObj->wrap($addressContent, $wrap);
                $content .= LF . LF;
            }
        }

        $templateAllWrap = $this->conf['templates.'][$this->conf['templateName'] . '.']['allWrap'];
        $content = $this->cObj->wrap($content, $templateAllWrap);

        $content = $this->cObj->wrap($content, $this->conf['wrap']);

        return $this->pi_wrapInBaseClass($content);
    }
public function main($content, $conf)
    {
        $this->templateService = GeneralUtility::makeInstance(MarkerBasedTemplateService::class);
        $this->init($conf);
        $singleSelection = $this->getSingleRecords();
        $groupSelection = $this->getRecordsFromGroups();

        $templateCode = $this->getTemplate();

        // apply sorting
        $addresses = $this->sortAddresses($singleSelection, $groupSelection);

        // limit output to max listMaxItems addresses
        if (((int)$this->conf['listMaxItems']) > 0) {
            $addresses = array_slice($addresses, 0, (int)$this->conf['listMaxItems']);
        }

        // output
        foreach ($addresses as $address) {
            if (!empty($address)) {
                $markerArray = $this->getItemMarkerArray($address);
                $subpartArray = $this->getSubpartArray($templateCode, $markerArray, $address);

                $addressContent = $this->templateService->substituteMarkerArrayCached(
                    $templateCode,
                    $markerArray,
                    $subpartArray
                );

                $wrap = $this->conf['templates.'][$this->conf['templateName'] . '.']['wrap'];
                $content .= $this->cObj->wrap($addressContent, $wrap);
                $content .= LF . LF;
            }
        }

        $templateAllWrap = $this->conf['templates.'][$this->conf['templateName'] . '.']['allWrap'];
        $content = $this->cObj->wrap($content, $templateAllWrap);

        $content = $this->cObj->wrap($content, $this->conf['wrap']);

        return $this->pi_wrapInBaseClass($content);
    }
public function main ( $ content , $ conf ) { $ this -> templateService = GeneralUtility :: makeInstance ( MarkerBasedTemplateService :: class ) ; $ this -> init ( $ conf ) ; $ singleSelection = $ this -> getSingleRecords ( ) ; $ groupSelection = $ this -> getRecordsFromGroups ( ) ; $ templateCode = $ this -> getTemplate ( ) ; // apply sorting $ addresses = $ this -> sortAddresses ( $ singleSelection , $ groupSelection ) ; // limit output to max listMaxItems addresses if ( ( ( int ) $ this -> conf [ 'listMaxItems' ] ) > 0 ) { $ addresses = array_slice ( $ addresses , 0 , ( int ) $ this -> conf [ 'listMaxItems' ] ) ; } // output foreach ( $ addresses as $ address ) { if ( ! empty ( $ address ) ) { $ markerArray = $ this -> getItemMarkerArray ( $ address ) ; $ subpartArray = $ this -> getSubpartArray ( $ templateCode , $ markerArray , $ address ) ; $ addressContent = $ this -> templateService -> substituteMarkerArrayCached ( $ templateCode , $ markerArray , $ subpartArray ) ; $ wrap = $ this -> conf [ 'templates.' ] [ $ this -> conf [ 'templateName' ] . '.' ] [ 'wrap' ] ; $ content .= $ this -> cObj -> wrap ( $ addressContent , $ wrap ) ; $ content .= LF . LF ; } } $ templateAllWrap = $ this -> conf [ 'templates.' ] [ $ this -> conf [ 'templateName' ] . '.' ] [ 'allWrap' ] ; $ content = $ this -> cObj -> wrap ( $ content , $ templateAllWrap ) ; $ content = $ this -> cObj -> wrap ( $ content , $ this -> conf [ 'wrap' ] ) ; return $ this -> pi_wrapInBaseClass ( $ content ) ; }
main method which controls the data flow and outputs the addresses

@param string $content Content string, empty
@param array $conf Configuration array with TS configuration
@return string The processed addresses
main method which controls the data flow and outputs the addresses