Returns the product analysis.
@param bool $textOnly whether to render text or HTML
@return string
504695
public function _render($textOnly) {
        $featureNum = count($this->product->getConfiguration()->getSelectedFeatures());
        $fileNum = count($this->files);

        $str = "";
        $maxLen = fphp\Helper\_String::getMaxLength($this->files, "getTarget");

        if ($textOnly)
            $str .= "\nProduct Analysis\n================\n" .
                 "For the given product, $featureNum features were selected and the following $fileNum files were generated:\n\n";
        else {
            $str .= "<h2>Product Analysis</h2>";
            $str .= "<div>";
            $str .= "<p>For the given product, $featureNum features were selected and the following $fileNum files were generated:</p>";
            $str .= "<ul>";
        }

        foreach ($this->files as $file) {
            $summary = $file->getContent()->getSummary();
            if ($textOnly) {
                $str .= sprintf("$this->accentColor%-{$maxLen}s$this->defaultColor %s\n", $file->getTarget(),
                                fphp\Helper\_String::truncate($summary));
            } else
                $str .= "<li><span class='fileName' onclick='var style = this.parentElement.children[1].style;
                                                      style.display = style.display === \"block\" ? \"none\" : \"block\";'>"
                     . $file->getTarget()
                     . "</span><pre style='font-size: 0.8em; display: none'>"
                     . str_replace("\n", "<br />", htmlspecialchars($summary)) . "</pre>"
                     . "</li>";
        }

        if (!$textOnly) {
            $str .= "</ul>";
            $str .= "</div>";
        }

        $str .= (new fphp\Artifact\TracingLinkRenderer($this->tracingLinks))->render($textOnly);
        return $str;
    }
1198199
protected function tagMisc()
	{
		// Initialize string
		$html = '';

		// Add conditional script for IE compatibility with HTML5 if option is active
		$this->addShiv();

		// Add analytics script if option is active and mode is production
		$this->addAnalytics();

 		foreach ($this->misc as $line)
 		{
 			// Return each item
 			$html .= $line . "\n\t";
 		}

 		// Return complete string
 		return $html;
	}
152197
public function getSearchProduct()
    {
        if ($this->_oSearchProduct === null) {
            $this->_oSearchProduct = false;
            $sSearchArtNum = $this->getSearchProductArtNr();

            foreach ($this->getProductList() as $oProduct) {
                if ($oProduct->oxarticles__oxartnum->value == $sSearchArtNum) {
                    $this->_oSearchProduct = $oProduct;
                    break;
                }
            }
        }

        return $this->_oSearchProduct;
    }
635080
public function getProduct()
    {
        $config = \OxidEsales\Eshop\Core\Registry::getConfig();
        $utils = \OxidEsales\Eshop\Core\Registry::getUtils();

        if ($this->_oProduct === null) {
            //this option is only for lists and we must reset value
            //as blLoadVariants = false affect "ab price" functionality
            $config->setConfigParam('blLoadVariants', true);

            $articleId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('anid');

            // object is not yet loaded
            $this->_oProduct = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);

            if (!$this->_oProduct->load($articleId)) {
                $utils->redirect($config->getShopHomeUrl());
                $utils->showMessageAndExit('');
            }

            $variantSelectionId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("varselid");
            $variantSelections = $this->_oProduct->getVariantSelections($variantSelectionId);
            if ($variantSelections && $variantSelections['oActiveVariant'] && $variantSelections['blPerfectFit']) {
                $this->_oProduct = $variantSelections['oActiveVariant'];
            }
        }

        // additional checks
        if (!$this->_blIsInitialized) {
            $this->_additionalChecksForArticle();
        }

        return $this->_oProduct;
    }
169265
public function getTextContent($normalize = false)
    {
        $nodeValue = $this->nodeValue;
        if ($normalize) {
            $nodeValue = trim(preg_replace('/\s{2,}/', ' ', $nodeValue));
        }

        return $nodeValue;
    }
508814
public function getAlsoBoughtTheseProducts()
    {
        if ($this->_aAlsoBoughtArts === null) {
            $this->_aAlsoBoughtArts = false;
            if ($article = $this->getProduct()) {
                $this->_aAlsoBoughtArts = $article->getCustomerAlsoBoughtThisProducts();
            }
        }

        return $this->_aAlsoBoughtArts;
    }
1264541
public function getProductName($productId): ?string
    {
        $product = $this->productRepository->find($productId);
        if (!$product instanceof ProductInterface) {
            return null;
        }

        return $product->getName();
    }
45757
public static function js($pro = false)
    {
        if($pro)
        {
            $url = 'pro.fontawesome.com';
            $integrity = 'sha384-GBwm0s/0wYcqnK/JmrCoRqWYIWzFiGEucsfFqkB76Ouii5+d4R31vWHPQtfhv55b';
        }
        else
        {
            $url = 'use.fontawesome.com';
            $integrity = 'sha384-g5uSoOSBd7KkhAMlnQILrecXvzst9TdC09/VM+pjDTCM+1il8RHz5fKANTFFb+gQ';
        }

        return '<script defer src="https://' . $url . '/releases/v' .
        self::FA_VERSION . '/js/all.js" integrity="' . $integrity . '" crossorigin="anonymous"></script>';
    }
201501
public function item_html($extraargs = array()) {
        if (is_string($this->item)) {
            $html = $this->item;
        } elseif (is_object($this->item)) {
            //for debug purposes only. You should create a sub class to
            //properly handle the record
            $html = join(', ', (array)$this->item);
        }
        return $html;
    }
560870
function getBoolean(): \Closure {
    return function($value, \Mustache_LambdaHelper $helper) {
      return HtmlHelper::encode(\Yii::$app->formatter->asBoolean($helper->render($value)));
    };
  }
143548
public function getFilterOptionsForUsedOnly($usedOnly)
    {
        $sortColumn = $this->getSortingColumn();

        if ($usedOnly) {
            $builder = $this->connection->createQueryBuilder()
                ->select('COUNT(sourceTable.' . $this->getIdColumn() . ') as mm_count')
                ->addSelect('sourceTable.*')
                ->from($this->getSelectSource(), 'sourceTable')
                ->rightJoin(
                    'sourceTable',
                    $this->getMetaModel()->getTableName(),
                    'modelTable',
                    'modelTable.' . $this->getColName() . '=sourceTable.' . $this->getIdColumn()
                )
                ->addGroupBy('sourceTable.' . $this->getIdColumn())
                ->addOrderBy('sourceTable.' . $sortColumn);

            if ($additionalWhere = $this->getAdditionalWhere()) {
                $builder->andWhere($additionalWhere);
            }

            return $builder->execute();
        }

        $builder = $this->connection->createQueryBuilder()
            ->select('COUNT(modelTable.' . $this->getColName() . ') as mm_count')
            ->addSelect('sourceTable.*')
            ->from($this->getSelectSource(), 'sourceTable')
            ->leftJoin(
                'sourceTable',
                $this->getMetaModel()->getTableName(),
                'modelTable',
                'modelTable.' . $this->getColName() . '=sourceTable.' . $this->getIdColumn()
            )
            ->addGroupBy('sourceTable.' . $this->getIdColumn())
            ->addOrderBy('sourceTable.' . $sortColumn);

        if ($additionalWhere = $this->getAdditionalWhere()) {
            $builder->andWhere($additionalWhere);
        }

        return $builder->execute();
    }
659904
public function get( $withScript = false )
    {
        $retVal = '';
        
        if ( $withScript ) {
            $retVal .= "<script type='text/javascript'>\n";
        }
        
        $retVal .= $this->current();
        
        if ( $withScript ) {
            $retVal .= "\n</script>\n";
        }
        
        return $retVal;
        
    }
1251436
public function renderAttributes()
    {
        if (empty($this->product->combinations)) {
            return false;
        }

        $this->_selectedCombination = $this->_cartComponent->getSelectedCombinationFromSession($this->product->id);

        $items = '';
        if (!empty($this->attributeContainerOptions)) {
            $items .= Html::beginTag('div', $this->attributeContainerOptions);
        }

        foreach ($this->product->productAttributes as $attribute) {
            $items .= Html::tag('p', $attribute->translation->title . ':', $this->attributeTitleOptions);
            $items .= $this->renderAttributeItem($attribute);
        }

        if (!empty($this->attributeContainerOptions)) {
            $items .= Html::endTag('div');
        }

        $items .= Html::tag('p', $this->notAvailableMessage, $this->notAvailableMessageOptions);

        return $items;
    }
139082
public function render($title = null, $typeOnly = false)
    {
        $expressionToExamine = $this->renderChildren();
        if ($typeOnly === true && $expressionToExamine !== null) {
            $expressionToExamine = (is_object($expressionToExamine) ? get_class($expressionToExamine) : gettype($expressionToExamine));
        }

        ob_start();
        \TYPO3\Flow\var_dump($expressionToExamine, $title);
        $output = ob_get_contents();
        ob_end_clean();
        return $output;
    }
1245079
public function isExcerptOnly($excerptOnly = null)
    {
        if ($excerptOnly !== null) {
            $this->excerptOnly = (bool) $excerptOnly;
        }

        return $this->excerptOnly;
    }
738197
public function getPicturesProduct()
    {
        $aVariantSelections = $this->getVariantSelections();
        if ($aVariantSelections && $aVariantSelections['oActiveVariant'] && !$aVariantSelections['blPerfectFit']) {
            return $aVariantSelections['oActiveVariant'];
        }

        return $this->getProduct();
    }
134350
public function renderText($text, bool $escape = true): string
    {
        if ($escape) {
            $text = $this->esc($text);
        }
        return (string) Container::getMarkdown()->text((string) $text);
    }