Collects article crosselling and attributes information, passes
them to Smarty engine and returns name or template file
"article_crossselling.tpl".

@return string
967452
public function render()
    {
        parent::render();

        $this->_aViewData['edit'] = $oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);

        // crossselling
        $this->_createCategoryTree("artcattree");

        // accessoires
        $this->_createCategoryTree("artcattree2");

        $soxId = $this->getEditObjectId();
        if (isset($soxId) && $soxId != "-1") {
            // load object
            $oArticle->load($soxId);

            if ($oArticle->isDerived()) {
                $this->_aViewData['readonly'] = true;
            }
        }

        $iAoc = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("aoc");
        if ($iAoc == 1) {
            $oArticleCrossellingAjax = oxNew(\OxidEsales\Eshop\Application\Controller\Admin\ArticleCrosssellingAjax::class);
            $this->_aViewData['oxajax'] = $oArticleCrossellingAjax->getColumns();

            return "popups/article_crossselling.tpl";
        } elseif ($iAoc == 2) {
            $oArticleAccessoriesAjax = oxNew(\OxidEsales\Eshop\Application\Controller\Admin\ArticleAccessoriesAjax::class);
            $this->_aViewData['oxajax'] = $oArticleAccessoriesAjax->getColumns();

            return "popups/article_accessories.tpl";
        }

        return "article_crossselling.tpl";
    }
411626
public function getContentPageTpl()
    {
        $aTemplate = [];
        $sContentId = $this->getContent()->oxcontents__oxloadid->value;
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
        if ($sContentId == $myConfig->getConfigParam('sRDFaBusinessEntityLoc')) {
            $aTemplate[] = $this->_sBusinessTemplate;
        }
        if ($sContentId == $myConfig->getConfigParam('sRDFaDeliveryChargeSpecLoc')) {
            $aTemplate[] = $this->_sDeliveryTemplate;
        }
        if ($sContentId == $myConfig->getConfigParam('sRDFaPaymentChargeSpecLoc')) {
            $aTemplate[] = $this->_sPaymentTemplate;
        }

        return $aTemplate;
    }
562777
public function open():string
	{
		if( isset($this->config['opener']) )
			{ return $this->config['opener']; }

		$this->parsePrivateAttributes();
		$this->parseCommonAttributes();

		if( isset($this->config['in_scope']) && isset($this->config['scope_function']) && is_callable($this->config['scope_function']) )
			{ $this->config['scope_function']->call($this,$this->document->scope); }

		$finisher= $this->isEmpty ? ' />' : '>';

		return "<{$this->tagName}{$this->attributesString}{$finisher}";
	}
1019782
protected function getContentTemplate()
	{
		$attributes = [
			'data'          => $this->attributes['src'],
			'style'         => $this->attributes['style'],
			'type'          => 'application/x-shockwave-flash',
			'typemustmatch' => ''
		];

		$flashVarsParam = '';
		if (isset($this->attributes['flashvars']))
		{
			$flashVarsParam = $this->generateParamElement('flashvars', $this->attributes['flashvars']);
		}

		$template = '<object>'
		          . $this->generateAttributes($attributes)
		          . $this->generateParamElement('allowfullscreen', 'true')
		          . $flashVarsParam
		          . '</object>';

		return $template;
	}
870181
private function getAttributes()
    {
        $r = '';

        // Inside classes
        foreach ($this->insideClasses as $insideClassModule => $insideClasses) {
            foreach ($insideClasses as $insideClass) {
                $attributes = $this->xml->xpath(
                    '/draggy/module[@name=\'' . $insideClassModule . '\']/class[@name=\'' . $insideClass . '\']/attribute'
                );

                $r .= 'c = Connectable.prototype.getConnectableFromName(\'' . str_replace(
                    '\\',
                    '\\\\',
                    $insideClassModule . '\\'
                ) . $insideClass . '\');' . PHP_EOL;

                $r .= $this->getClassLikeAttributeProperties($insideClass, $attributes, 'c');

                if (isset( $insideClass['toString'] )) {
                    $r .= 'c.setToString(c.getAttributeFromName("' . $insideClass['toString'] . '"))' . PHP_EOL;
                }
            }
        }

        // Inside abstracts
        foreach ($this->insideAbstracts as $insideAbstractModule => $insideAbstracts) {
            foreach ($insideAbstracts as $insideAbstract) {
                $attributes = $this->xml->xpath(
                    '/draggy/module[@name=\'' . $insideAbstractModule . '\']/abstract[@name=\'' . $insideAbstract . '\']/attribute'
                );

                $r .= 's = Connectable.prototype.getConnectableFromName(\'' . str_replace(
                    '\\',
                    '\\\\',
                    $insideAbstractModule . '\\'
                ) . $insideAbstract . '\');' . PHP_EOL;

                $r .= $this->getClassLikeAttributeProperties($insideAbstract, $attributes, 's');

                if (isset( $insideAbstract['toString'] )) {
                    $r .= 's.setToString(s.getAttributeFromName("' . $insideAbstract['toString'] . '"))' . PHP_EOL;
                }
            }
        }

        // Outside classes
        foreach ($this->outsideClasses as $outsideClass) {
            $attributes = $this->xml->xpath('/draggy/loose/class[@name=\'' . $outsideClass . '\']/attribute');

            $r .= 'c = Connectable.prototype.getConnectableFromName(\'' . $outsideClass . '\');' . PHP_EOL;

            $r .= $this->getClassLikeAttributeProperties($outsideClass, $attributes, 'c');

            if (isset( $outsideClass['toString'] )) {
                $r .= 'c.setToString(c.getAttributeFromName("' . $outsideClass['toString'] . '"))' . PHP_EOL;
            }
        }

        // Outside abstracts
        foreach ($this->outsideAbstracts as $outsideAbstract) {
            $attributes = $this->xml->xpath('/draggy/loose/abstract[@name=\'' . $outsideAbstract . '\']/attribute');

            $r .= 's = Connectable.prototype.getConnectableFromName(\'' . $outsideAbstract . '\');' . PHP_EOL;

            $r .= $this->getClassLikeAttributeProperties($outsideAbstract, $attributes, 's');

            if (isset( $outsideAbstract['toString'] )) {
                $r .= 's.setToString(s.getAttributeFromName("' . $outsideAbstract['toString'] . '"))' . PHP_EOL;
            }
        }

        return $r;
    }
723105
public function getTitle()
    {
        $oLang = \OxidEsales\Eshop\Core\Registry::getLang();
        if ($aActiveList = $this->getActiveRecommList()) {
            $sTranslatedString = $oLang->translateString('LIST_BY', $oLang->getBaseLanguage(), false);
            $sTitleField = 'oxrecommlists__oxtitle';
            $sAuthorField = 'oxrecommlists__oxauthor';

            return $aActiveList->$sTitleField->value . ' (' . $sTranslatedString . ' ' .
                      $aActiveList->$sAuthorField->value . ')';
        }
        $sTranslatedString = $oLang->translateString('HITS_FOR', $oLang->getBaseLanguage(), false);

        return $this->getArticleCount() . ' ' . $sTranslatedString . ' "' . $this->getSearchForHtml() . '"';
    }
626031
public function getItemLabelAttribute()
    {
        if( $this->type == 'link' ) {
            return $this->link_text;
        }

        if( $this->type == 'page' && ! is_null($this->page) )
            return get_translation_name('title', $this->language_code, $this->page->translations->toArray());

        return '';
    }
195088
public function getTitle()
    {
        if ($article = $this->getProduct()) {
            $articleTitle = $article->oxarticles__oxtitle->value;
            $variantSelectionId = $article->oxarticles__oxvarselect->value;

            $variantSelectionValue = $variantSelectionId ? ' ' . $variantSelectionId : '';

            return $articleTitle . $variantSelectionValue;
        }
    }
1087870
public function getItemUrlAttribute()
    {
        if( $this->type == 'link' ) {
            return $this->url;
        }

        if( $this->type == 'page' && ! is_null($this->page) )
            return $this->page->page_url;

        return '';
    }
306041
public static function get_meta_data()
    {
        $data = self::$meta_data;
        
        $defaults = array(
            'Description' => _t('DocumentationViewer.OPENSEARCHDESC', 'Search the documentation'),
            'Tags' => _t('DocumentationViewer.OPENSEARCHTAGS', 'documentation'),
            'Contact' => Config::inst()->get('Email', 'admin_email'),
            'ShortName' => _t('DocumentationViewer.OPENSEARCHNAME', 'Documentation Search'),
            'Author' => 'SilverStripe'
        );
        
        foreach ($defaults as $key => $value) {
            if (isset($data[$key])) {
                $defaults[$key] = $data[$key];
            }
        }
        
        return $defaults;
    }
847582
public function index() {

		// Determine whether a search engine has been selected.

		$engine = $this->data()->SearchEngine;
		$classes = Config::inst()->get(FulltextSearchable::class, 'searchable_classes');
		if(!$engine || (($engine !== 'Full-Text') && !ClassInfo::exists($engine)) || (($engine === 'Full-Text') && (!is_array($classes) || (count($classes) === 0)))) {

			// The search engine has not been selected.

			return $this->httpError(404);
		}

		// 

		if($this->data()->StartWithListing) {

			// Display some search results.

			$request = $this->getRequest();
			return $this->getSearchResults(array(
				'Search' => $request->getVar('Search'),
				'SortBy' => $request->getVar('SortBy'),
				'SortDirection' => $request->getVar('SortDirection')
			), $this->getForm($request));
		}
		else {

			// Instantiate some default templates.

			$templates = array(
				'ExtensibleSearch',
				'ExtensibleSearchPage',
				'Page'
			);

			// Instantiate the search engine specific templates.

			if($engine !== 'Full-Text') {
				$explode = explode('\\', $engine);
				$explode = end($explode);
				$templates = array_merge(array(
					$explode,
					"{$explode}Page"
				), $templates);
			}

			// Determine the template to use.

			$this->extend('updateTemplates', $templates);
			return $this->renderWith($templates);
		}
	}
1357673
public function getBasketItems()
    {
        if ($this->_aBasketItemList === null) {
            $this->_aBasketItemList = false;

            // passing basket articles
            if ($oBasket = $this->getSession()->getBasket()) {
                $this->_aBasketItemList = $oBasket->getBasketArticles();
            }
        }

        return $this->_aBasketItemList;
    }
1312472
public function getTitle()
    {
        // configure the link
        $linkconf = $this->getResultLinkConfiguration();

        list($type) = explode(':', $this->row['type']);
        switch ($type) {
            case 'file':
                // if we use FAL, see if we have a title in the metadata
                if ($this->row['orig_uid'] && ($fileObject = SearchHelper::getFile($this->row['orig_uid']))) {
                    $metadata = $fileObject->_getMetaData();
                    $linktext = ($metadata['title'] ? $metadata['title'] : $this->row['title']);
                } else {
                    $linktext = $this->row['title'];
                }
                break;
            default:
                $linktext = $this->row['title'];
                break;
        }

        // clean title
        $linktext = htmlspecialchars(strip_tags($linktext));

        // highlight hits in result title?
        if ($this->conf['highlightSword'] && count($this->pObj->swords)) {
            $linktext = $this->highlightArrayOfWordsInContent($this->pObj->swords, $linktext);
        }
        return $this->cObj->typoLink($linktext, $linkconf);
    }
897988
public function getProduct()
    {
        if ($this->_oArticle === null) {
            $this->_oArticle = false;
            $aParams = $this->_getParams();
            $oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
            $oArticle->load($aParams['aid']);
            $this->_oArticle = $oArticle;
        }

        return $this->_oArticle;
    }
870252
public function getMetas()
    {
        $ret = array();

        if (!isset($this->metas['title']) && $this->getParameter('nyroDev_utility.share.title')) {
            $this->setTitle($this->getParameter('nyroDev_utility.share.title'));
        }
        if (!isset($this->metas['description']) && $this->getParameter('nyroDev_utility.share.description')) {
            $this->setDescription($this->getParameter('nyroDev_utility.share.description'));
        }
        if (!isset($this->metas['keywords']) && $this->getParameter('nyroDev_utility.share.keywords')) {
            $this->set('keywords', $this->getParameter('nyroDev_utility.share.keywords'));
        }
        if (!isset($this->metasProp['og:image']) && $this->getParameter('nyroDev_utility.share.image')) {
            $this->setImage($this->getParameter('nyroDev_utility.share.image'));
        }

        if (isset($this->metas['title']) && $this->metas['title']) {
            $ret[] = '<title>'.$this->metas['title'].'</title>';
            unset($this->metas['title']);
        }

        foreach ($this->metas as $k => $v) {
            $ret[] = '<meta name="'.$k.'" content="'.str_replace('"', '&quot;', $v).'" />';
        }
        foreach ($this->metasProp as $k => $v) {
            $ret[] = '<meta property="'.$k.'" content="'.str_replace('"', '&quot;', $v).'" />';
        }

        return implode("\n", $ret);
    }
888870
public function getCrossSelling()
    {
        if ($this->_oCrossSelling === null) {
            $this->_oCrossSelling = false;
            if ($oProduct = $this->getProduct()) {
                $this->_oCrossSelling = $oProduct->getCrossSelling();
            }
        }

        return $this->_oCrossSelling;
    }
1153314
public function getLinkAttribute()
    {
        $category = FieldCategory::query()->first();
        if (is_null($category)) {
            return handles('antares::customfields/index');
        }
        return handles('antares::customfields/' . $category->name . '/index');
    }