Renders the object as a slide for the HTML template.

@param boolean $isFirst Slide is first in the list.
@param boolean $isMiddle Slide is in the middle of the list.
@param boolean $isLast Slide is last in the list.

@return DBHTMLText
500146
public function renderSlide($isFirst = false, $isMiddle = false, $isLast = false)
    {
        return $this->customise([
            'isFirst' => $isFirst,
            'isMiddle' => $isMiddle,
            'isLast' => $isLast
        ])->renderWith($this->getTemplate());
    }
1078277
public function onOrderExecute($oBasket, $iSuccess)
    {

        if (is_numeric($iSuccess) && $iSuccess != 2 && $iSuccess <= 3) {
            //adding user to particular customer groups
            $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
            $dMidlleCustPrice = (float) $myConfig->getConfigParam('sMidlleCustPrice');
            $dLargeCustPrice = (float) $myConfig->getConfigParam('sLargeCustPrice');

            $this->addToGroup('oxidcustomer');
            $dBasketPrice = $oBasket->getPrice()->getBruttoPrice();
            if ($dBasketPrice < $dMidlleCustPrice) {
                $this->addToGroup('oxidsmallcust');
            }
            if ($dBasketPrice >= $dMidlleCustPrice && $dBasketPrice < $dLargeCustPrice) {
                $this->addToGroup('oxidmiddlecust');
            }
            if ($dBasketPrice >= $dLargeCustPrice) {
                $this->addToGroup('oxidgoodcust');
            }

            if ($this->inGroup('oxidnotyetordered')) {
                $this->removeFromGroup('oxidnotyetordered');
            }
        }
    }
486690
public function setFirst($first)
    {
        $this->_links[self::FIRST][self::HREF] = $first;
        $this->removeEmptyLinks();

        return $this;
    }
78048
public function getSlideAttributes($isFirst = false, $isMiddle = false, $isLast = false)
    {
        $attributes = ['class' => $this->getSlideClass($isFirst, $isMiddle, $isLast)];
        
        if ($this->getParent()->hasMethod('getSlideAttributes')) {
            
            $attributes = array_merge(
                $attributes,
                $this->getParent()->getSlideAttributes(
                    $this,
                    $isFirst,
                    $isMiddle,
                    $isLast
                )
            );
            
        }
        
        $this->extend('updateSlideAttributes', $attributes);
        
        return $attributes;
    }
181299
private function configureSlideShow(ContainerBuilder $container, $config)
    {
        $registry = $container->getDefinition('ekyna_cms.slide_show.registry');

        $container->setParameter('ekyna_cms.slide_show.static', $config['static']);
        $container->setParameter('ekyna_cms.slide_show.themes', $config['themes']);

        $types = $config['types'];

        if (!isset($types['default'])) {
            $types['default'] = [
                'class'   => Type\DefaultType::class,
                'js_path' => 'ekyna-cms/slide-show/type/default',
                'label'   => 'ekyna_cms.slide.type.default.label',
                'config'  => [],
            ];
        }
        if (!isset($types['hero'])) {
            $types['hero'] = [
                'class'   => Type\HeroType::class,
                'js_path' => 'ekyna-cms/slide-show/type/hero',
                'label'   => 'ekyna_cms.slide.type.hero.label',
                'config'  => [],
            ];
        }

        foreach ($types as $name => $c) {
            $class = $c['class'];
            if (class_exists($class)) {
                $id = "ekyna_cms.slide_show.type.{$name}";
                $definition = new Definition($class, []);
                $container->setDefinition($id, $definition);
            } elseif ($container->hasDefinition($class)) {
                $id = $class;
                $definition = $container->getDefinition($class);
                $class = $definition->getClass();
            } else {
                throw new \InvalidArgumentException("Unexpected slide show type '$class'.");
            }

            if (is_subclass_of($class, Type\AbstractType::class)) {
                $definition->addMethodCall('setMediaRepository', [new Reference('ekyna_media.media.repository')]);
                $definition->addMethodCall('setMediaGenerator', [new Reference('ekyna_media.generator')]);
            }

            $definition->addMethodCall('configure', [
                $name,
                $c['label'],
                $c['js_path'],
                isset($c['config']) ? $c['config'] : [],
            ]);

            $registry->addMethodCall('register', [new Reference($id)]);
        }
    }
19139
public function isContentShown($isFirst = false, $isMiddle = false, $isLast = false)
    {
        return $this->isShown('Content', $isFirst, $isMiddle, $isLast);
    }
92789
protected function lexList(bool $isConst): ListValueNode
    {
        $start = $this->lexer->getToken();

        $parseFunction = function () use ($isConst) {
            return $this->lexValue($isConst);
        };

        return new ListValueNode(
            $this->any(
                TokenKindEnum::BRACKET_L,
                $parseFunction,
                TokenKindEnum::BRACKET_R
            ),
            $this->createLocation($start)
        );
    }
156427
private function buildJsRouting(bool $isbaseapp = false)
    {
        Output::displayAsSuccess("Hey, I will build the JS Routing file", "none");
        $rt = new JsRouting($isbaseapp);
        $rt->build();
        if (in_array("--noexit", $this->options["options"])) {
            Output::displayAsEndSuccess("Build the JS Routing File is a success.", "none");
        } else {
            Output::displayAsNormal("Build the JS Routing File is a success.");
        }
    }
211069
private function constructHTML ($firstBoundary)
    {

        // Reset the message

        $message		= NULL;

        // Set boundaries

        $secondBoundary	= '=====' . md5 (uniqid (time ()));
        $thirdBoundary	= '=====' . md5 (uniqid (time ()));

        // Get HTML and Plain strings

        $html			= NULL;
        $plain			= NULL;

        foreach ($this->_html as $htmlBlock)
        {
            $html .= $htmlBlock;
        }

        if ($this->_plain)
        {

            foreach ($this->_plain as $plainBlock)
            {
                $plain .= $plainBlock;
            }

        }
        else
        {
            $plain	= strip_tags ($html);
        }

        // If there are images

        if ($this->_imagesSet)
        {

            // Replace images with CID in HTML message

            foreach ($this->_images as $image)
            {

                $html	= preg_replace ($image['name'], 'cid:' . $image['cid'], $html);

            }

            // Generate HTML Message

            $message	.= '--' . $firstBoundary . $this->_nl;
            $message	.= 'Content-Type: multipart/related;' . $this->_nl . chr (9);
            $message	.= 'boundary="' . $secondBoundary . '"' . str_repeat ($this->_nl, 3);

            $message	.= '--' . $secondBoundary . $this->_nl;
            $message	.= 'Content-Type: Multipart/alternative;' . $this->_nl . chr (9);
            $message	.= 'boundary="' . $thirdBoundary . '"' . str_repeat ($this->_nl, 3);

            $message	.= '--' . $thirdBoundary . $this->_nl;
            $message	.= 'Content-Type: text/plain; "charset=iso-8859-1"' . $this->_nl;
            $message	.= 'Content-Transfer-Encoding: 8bit' . str_repeat ($this->_nl, 2);
            $message	.= $plain . str_repeat ($this->_nl, 2);

            $message	.= '--' . $thirdBoundary . $this->_nl;
            $message	.= 'Content-Type: text/html; "charset=iso-8859-1"' . $this->_nl;
            $message	.= 'Content-Transfer-Encoding: 8bit' . str_repeat ($this->_nl, 2);
            $message	.= $html . str_repeat ($this->_nl, 2);
            $message	.= '--' . $thirdBoundary . '--' . str_repeat ($this->_nl, 2);

            // Add Images

            foreach ($this->_images as $image)
            {
                $message	.= $this->constructImage ($image, $secondBoundary);
            }

            // End HTML

            $message	.= '--' . $secondBoundary . '--' . str_repeat ($this->_nl, 2);

        }
        else
        {

            // Generate HTML Message

            if ($plain)
            {

                $message	.= '--' . $firstBoundary . $this->_nl;
                $message	.= 'Content-Type: text/plain; charset="iso-8859-1"' . $this->_nl;
                $message	.= 'Content-Transfer-Encoding: 8bit' . str_repeat ($this->_nl, 2);
                $message	.= $plain . str_repeat ($this->_nl, 2);

            }

            if ($html)
            {

                $message	.= '--' . $firstBoundary . $this->_nl;
                $message	.= 'Content-Type: text/html; "charset=iso-8859-1"' . $this->_nl;
                $message	.= 'Content-Transfer-Encoding: 8bit' . str_repeat ($this->_nl, 2);
                $message	.= $html . str_repeat ($this->_nl, 2);

            }

        }

        // Return message

        return $message;

    }
85696
public function strDash($str, $camelFirst = true)
    {
        if ($camelFirst) {
            $str = StrUtil::camel($str);
        }
        return StrUtil::dash($str);
    }
210158
public function sendMarkdownMsg($title, $content, array $atMobiles = [], $isAtAll = false)
    {
        $query = [
            'msgtype' => 'markdown',
            'markdown' => [
                'title' => $title,
                'text' => $content,
            ],
            'at' => [
                'isAtAll' => $isAtAll
            ],
        ];
        if (is_array($atMobiles) && count($atMobiles)>0) {
            $query['at']['atMobiles'] = $atMobiles;
        }
        return $this->sendMsg($query);
    }
275310
protected function lexObjectField(bool $isConst): ObjectFieldNode
    {
        $start = $this->lexer->getToken();

        /**
         * @param bool $isConst
         * @return NodeInterface|TypeNodeInterface|ValueNodeInterface
         */
        $parseValue = function (bool $isConst): NodeInterface {
            $this->expect(TokenKindEnum::COLON);
            return $this->lexValue($isConst);
        };

        return new ObjectFieldNode(
            $this->lexName(),
            $parseValue($isConst),
            $this->createLocation($start)
        );
    }
809388
public function formatFirstMajorFact(array $facts, int $style): string
    {
        foreach ($this->facts($facts, true) as $event) {
            // Only display if it has a date or place (or both)
            if ($event->date()->isOK() && $event->place()->gedcomName() !== '') {
                $joiner = ' — ';
            } else {
                $joiner = '';
            }
            if ($event->date()->isOK() || $event->place()->gedcomName() !== '') {
                switch ($style) {
                    case 1:
                        return '<br><em>' . $event->label() . ' ' . FunctionsPrint::formatFactDate($event, $this, false, false) . $joiner . FunctionsPrint::formatFactPlace($event) . '</em>';
                    case 2:
                        return '<dl><dt class="label">' . $event->label() . '</dt><dd class="field">' . FunctionsPrint::formatFactDate($event, $this, false, false) . $joiner . FunctionsPrint::formatFactPlace($event) . '</dd></dl>';
                }
            }
        }

        return '';
    }
556806
private function _transform($sContent, $sTemplateName, $bFirst = false, $bDoCompilation = true) 
	{
	    if ($this->_bIsLayout === true && self::$_aDisableRenderLevel[1] === true 
	       && self::$_aDisableRenderLevel[2] === true) { 

	        $sContent = '';
	    }
	    else if ($this->_bIsLayout === true && self::$_aDisableRenderLevel[1] === true 
	       && self::$_aDisableRenderLevel[2] === false) { 

	        $sContent = preg_replace('/^(.*)\{include file=\$model\}(.*)$/msi', '$1$2', $sContent);
	    }
	    else if ($this->_bIsLayout === true && self::$_iRenderLevel < 2) { 

	        $sContent = preg_replace('/^.*(\{include file=\$model\}).*$/msi', '$1', $sContent);
	    }
	    else if (self::$_iRenderLevel < 1 || self::$_aDisableRenderLevel[1] === true) { 

	        $sContent = '';
	    }
	    
		//*****************************************************************************************************************************
		// NEW version
		// @deprecated
		//
		// {$foo[section_name]}? http://www.smarty.net/docs/en/language.syntax.variables.tpl
		//*****************************************************************************************************************************

		$sTmpDirectory = self::$_sCachePath;
		$sTmpDirectory = str_replace('\\', '\\\\\\', $sTmpDirectory);

		$sViewDirectory = self::$_sBasePath;

		$_aProtectedVar = $this->_aVar;
		$_aProtectedVar['app']['config'] = array();
		$_aProtectedVar['app']['server'] = $_SERVER;
		$_aProtectedVar['app']['get'] = $_GET;
		$_aProtectedVar['app']['post'] = $_POST;
		$_aProtectedVar['app']['cookies'] = $_COOKIE;
		$_aProtectedVar['app']['env'] = $_ENV;
		
		if (isset($_SESSION)) { $_aProtectedVar['app']['session'] = $_SESSION; }
		else { $_aProtectedVar['app']['session'] = array(); }
		
		$_aProtectedVar['app']['request'] = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_ENV);
		$_aProtectedVar['app']['now'] = time();
		$_aProtectedVar['app']['const'] = get_defined_constants();
		$_aProtectedVar['app']['capture'] = array();					// link to {capture} -> to do it
		$_aProtectedVar['app']['section'] = array();					// link to {section} -> to do it
		$_aProtectedVar['app']['template'] = $this->_sTemplateName;
		$_aProtectedVar['app']['template_object'] = $this;
		$_aProtectedVar['app']['current_dir'] = $sViewDirectory;
		$_aProtectedVar['app']['version'] = self::VERSION;
		$_aProtectedVar['app']['block'] = array();						// link to {block} -> to do it
		$_aProtectedVar['app']['block']['child'] = null;
		$_aProtectedVar['app']['block']['parent'] = null;
		$_aProtectedVar['app']['ldelim'] = $this->_sLeftDelimiter;
		$_aProtectedVar['app']['rdelim'] = $this->_sRightDelimiter;

		//*****************************************************************************************************************************
		// tags: {counter}, {$SCRIPT_NAME}
		//*****************************************************************************************************************************

		$sContent = str_replace('{counter}', '$_aProtectedVar[\'i\']', $sContent);
		$sContent = str_replace('{$SCRIPT_NAME}', '$_aProtectedVar[\'app\'][\'SERVER\'][\'SCRIPT_NAME\']', $sContent);

		//*****************************************************************************************************************************
		// comments: {* this is a comment *}
		//*****************************************************************************************************************************

		$sContent = preg_replace('|\{\*|', '<?php /*', $sContent);
		$sContent = preg_replace('|\*\}|', '*/ ?>', $sContent);

		//*****************************************************************************************************************************
		// escape: {literal}function bazzy {alert('foobar!');}{/literal}
		//*****************************************************************************************************************************

		$sContent = preg_replace('|'.preg_quote($this->getLeftDelimiter()).'|', "\n".'<?php echo <<<EOF'."\n", $sContent);
		$sContent = preg_replace('|'.preg_quote($this->getRightDelimiter()).'|', "\n".'EOF;'."\n".'?>'."\n", $sContent);

		while (preg_match('|(<<<EOF(?:(?<!EOF;).)+?)\$(.+?EOF;)|msi', $sContent)) {

			$sContent = preg_replace('|(<<<EOF(?:(?<!EOF;).)+?)\$(.+?EOF;)|msi', '$1#DOLLAR#$2', $sContent);
		}


		//*****************************************************************************************************************************
		// variables: {$foo}, {$foo[4]}, {$foo.bar}, {$foo.$bar}, {$foo->bar}, {$foo->bar()}, {$foo.bar.baz}, {$foo.$bar.$baz},
		//				{$foo[4].baz}, {$foo[4].$baz}, {$foo.bar.baz[4]}, {$foo->bar($baz,2,$bar)}, {$app.config.foo},
		//				{$app.server.SERVER_NAME}, {$x+$y}, {$foo[$x+3]}, {$foo={counter}+3}, {$foo="this is message {counter}"},
		//				{$foo=$bar+2}, {$foo = strlen($bar)}, {$foo = myfunct( ($x+$y)*3 )}, {$foo.bar=1}, {$foo.bar.baz=1},
		//				{$foo[]=1}, {$foo.a.b.c}, {$foo.a.$b.c}, {$foo.a.{$b+4}.c}, {$foo.a.{$b.c}}, {$foo['bar']}, {$foo['bar'][1]},
		//				{$foo[$x+$x]}, {$foo[$bar[1]]}, $foo_{$bar}, $foo_{$x+$y}, $foo_{$bar}_buh_{$blar}, {$foo_{$x}}, {time()}
		//				{$foo+1}, {$foo*$bar}, {$app.get.page}, {$app.post.page}, {$app.cookies.page}, , {$app.anv.path},
		//				{$app.session.page}, {$app.request.page}, {$app.now}, {$app.const.page}, {$smarty.capture}, {$smarty.section},
		//				{$smarty.template}, {$smarty.current_dir}, {$smarty.version}, {$smarty.template_object}, {$smarty.block.child},
		//				{$smarty.block.parent}, {$app.ldelim}, {$app.rdelim}
		// particulier ;
		// version 1 forbiden : {$app['security']}, {$app['user']}, {$app['environment']}, {$app['debug']}
		//*****************************************************************************************************************************

		while (preg_match('|\{(.*?)\$([^_\(][a-z0-9_\[\]\->\(\)\+/*\']+)\.([a-z0-9_]+)(.*?)\}|msi', $sContent, $ret)) {

			$sContent = preg_replace('|\{(.*?)\$([^_\(][a-z0-9_\[\]\->\(\)\+/*\']+)\.([a-z0-9_]+)(.*?)\}|msi',
							'{'.'$1'.'$'.'$2[\'$3\']'.'$4'.'}', $sContent);
		}



		// {$foo.$bar.baz}

		$sContent = preg_replace('|\{(.*?)\$([^_\(][a-z0-9_]*)([a-z0-9_\[\].\->\(\)\+/*\']*)\.\$([^_][a-z0-9_]*)([a-z0-9_\[\]\->\(\)\+/*\']*)(.*?)\}|msi',
			'{'.'$1'.'$_aProtectedVar[\'$2\']$3[$_aProtectedVar[\'$4\']$5]'.'$6'.'}', $sContent);

		// {$foo.a.{$b.c}}

		$sContent = preg_replace('|\{(.*?)\$([^_\(][a-z0-9_]*)([a-z0-9_\[\].\->\(\)\+/*\']*)\.\{\$([^_][a-z0-9_]*)([a-z0-9_\[\]\->.\(\)\+/*\']*)\}(.*?)\}|msi',
						'{'.'$1'.'$_aProtectedVar[\'$2\']$3[$_aProtectedVar[\'$4\']$5]'.'$6'.'}', $sContent);

		// $foo_{$bar}, $foo_{$x+$y}, $foo_{$bar}_buh_{$blar}, {$foo_{$x}}

		$sContent = preg_replace('|\{(.*?)\$([^_\(][a-z0-9_]*?)_\{([a-z0-9_\+/*\->\$\(\)\[\]]*)([a-z0-9_\[\]\->\(\)\+/*\']*)\}(.*?)\}|msi',
						'{'.'$1'.'$_aProtectedVar[\'$2\'.($3)]'.'$5'.'}', $sContent);

		while (preg_match('|\{(.*?)\$([^_\(][a-z0-9_]*)([a-z0-9_\[\].\->\(\)\+/*\']*)(.*?)\}|msi', $sContent)) {

			$sContent = preg_replace('|\{(.*?)\$([^_\(][a-z0-9_]*)([a-z0-9_\[\].\->\(\)\+/*\']*)(.*?)\}|msi',
							'{'.'$1'.'$_aProtectedVar[\'$2\']$3'.'$4'.'}', $sContent);
		}

		//*****************************************************************************************************************************
		// var modifiers : {$smarty.now|date_format:'%Y-%m-%d %H:%M:%S'}
		//*****************************************************************************************************************************

		preg_match_all('#\{(\$_aProtectedVar[a-z0-9_\[\].\->\(\)\+/*\']*)\|([^:\}]+)([^\}]*)\}#msi', $sContent, $aMatchs, PREG_SET_ORDER);

		foreach ($aMatchs as $aOne) {

			$sName = ucfirst($aOne[2]);

			$sName = preg_replace('|_([a-z])|e', 'strtoupper("$1")', $sName);
			// replace the name of modifier which are a key name of php
			$sName = str_replace(array('Default'), array('StringDefault'), $sName);

			if (file_exists(__DIR__.DIRECTORY_SEPARATOR.'Template'.DIRECTORY_SEPARATOR.'Modifiers'.DIRECTORY_SEPARATOR.$sName.'.php')) {

				$sClassName = '\Apollina\Template\Modifiers\\'.$sName;
				$oFunction = new $sClassName;
				$aAttributes = explode(' ', $aOne[3]);
				preg_match_all('#:([^:]+)#msi', $aOne[3], $aMatchs2, PREG_SET_ORDER);
				$aParams = [];
				$aParams[] = $aOne[1];
				$iIndex = 1;

				foreach ($aMatchs2 as $sOne2) {

					if (!isset($aParams[$iIndex])) { $aParams[$iIndex] = $sOne2[1]; }
					else { $aParams[$iIndex] .= $sOne2[1]; }

					if (substr($aParams[$iIndex], -1) == "'" && substr($aParams[$iIndex], 0, 1) == "'") { $iIndex++; }
					else if (substr($aParams[$iIndex], -1) == '"' && substr($aParams[$iIndex], 0, 1) == '"') { $iIndex++; }
					else if (substr($aParams[$iIndex], 0, 1) != '"' && substr($aParams[$iIndex], 0, 1) != "'") { $iIndex++; }
					else { $aParams[$iIndex] .= ":"; }
				}

				$oFunction->run($aParams);
				$sContent = str_replace($aOne[0], call_user_func_array(array($oFunction, 'replaceBy') , $aParams), $sContent);
			}
		}

		//*****************************************************************************************************************************
		// transformation all : {$ssdsd} in <php echo ; >
		//*****************************************************************************************************************************

		$sContent = preg_replace('|\{(\$[a-z0-9_\[\].\->\(\)\$\+/*\'=+]+)\}|msi', '<?php echo $1; ?>', $sContent);
		$sContent = preg_replace('|\{([a-z0-9_\(\),.]+\(\$[a-z0-9_\[\].\->\(\)\$\+/*\'"]+[ a-z0-9_\(\),".]+)\}|msi', '<?php echo $1; ?>', $sContent);
		$sContent = preg_replace('|\{([a-z0-9_\(\),.]+\([^\}]+\))\}|msi', '<?php echo $1; ?>', $sContent);

		$sContent = preg_replace('|echo echo|', 'echo', $sContent);

		//*****************************************************************************************************************************
		// escape: {ldelim}function{/rdelim}
		//*****************************************************************************************************************************

		$sContent = preg_replace('|<?php echo ldelim; ?>|', '{', $sContent);
		$sContent = preg_replace('|<?php echo rdelim; ?>|', '}', $sContent);

		//*****************************************************************************************************************************
		// variables: {#foo#}
		//*****************************************************************************************************************************

		$sContent = preg_replace('|\{#([a-z0-9_]+)#\}|msi', '<?php echo $_aProtectedVar[\'app\'][\'config\'][\'$1\']; ?>', $sContent);

		//*****************************************************************************************************************************
		// variables: {"foo"}
		//*****************************************************************************************************************************

		$sContent = preg_replace('|\{"([^"]+)"\}|msi', '<?php echo "$1"; ?>', $sContent);

		//*****************************************************************************************************************************
		// {$nale='dsds'}
		//*****************************************************************************************************************************

		$sContent = preg_replace('|\{(\$_aProtectedVar[^= }]+=[\'"][^\'"}]+[\'"])\}|msi', '<?php $1'.'; ?>', $sContent);

		//*****************************************************************************************************************************
		// variables: {funcname attr1="val1" attr2="val2"}
		//				{assign var=foo value={counter}}
		//				{html_select_date display_days=true}
		//				{mailto address="smarty@example.com"}
		//				{html_options options=$companies selected=$company_id}
		//				{include file="subdir/$tpl_name.tpl"} => exception : class ToInclude
		//				{cycle values="one,two,`$smarty.config.myval`"}
		//				{config_load file='foo.conf'}
		//				{url alias='home' ...}
		//*****************************************************************************************************************************

		preg_match_all('|\{([a-z0-9_]+) +([a-z]+=[^\}]+)\}|msi', $sContent, $aMatchs, PREG_SET_ORDER);

		foreach ($aMatchs as $aOne) {

			$sName = ucfirst($aOne[1]);

			$sName = preg_replace_callback('|_([a-z])|', function ($aMatches) {
				return strtoupper($aMatches[1]);
			}, $sName);

			if ($sName == 'Include') { $sName = 'ToInclude'; }
			if ($sName == 'Foreach') { $sName = 'ToForeach'; }

			if (file_exists(__DIR__.DIRECTORY_SEPARATOR.'Template'.DIRECTORY_SEPARATOR.'Functions'.DIRECTORY_SEPARATOR.$sName.'.php')) {

				$sClassName = 'Apollina\Template\Functions\\'.$sName;
				$oFunction = new $sClassName;
				$aAttributes = explode(' ', $aOne[2]);

				$aParams = [];

				foreach ($aAttributes as $sOne2) {

					$aSplitParams = explode('=', $sOne2);
					$aParams[$aSplitParams[0]] = $aSplitParams[1];
				}

				if ($sName == 'ToInclude') {

					if (preg_match('/_aProtectedVar/', $aParams['file'])) {

						$sModelToCall = str_replace(array("\$_aProtectedVar['", "']", "'", '"'), array('', '' , '', ''), $aParams['file']);
						$aParams['real_name'] = $_aProtectedVar[$sModelToCall];
					}
					else {

						$aParams['real_name'] = str_replace(array("'", '"'), array('', ''), $aParams['file']);
					}
				}

				$sContent = str_replace($aOne[0], $oFunction->replaceBy($aParams), $sContent);
			}
			
			foreach ($this->_aFunctionsPath as $sOnePath) {

			    if (file_exists($sOnePath['files'].DIRECTORY_SEPARATOR.$sName.'.php')) {
			    
			        $sClassName = $sOnePath['namespace'].$sName;
			        $oFunction = new $sClassName;
			        $aAttributes = explode(' ', $aOne[2]);
			    
			        $aParams = [];
			    
			        foreach ($aAttributes as $sOne2) {
			    
			            $aSplitParams = explode('=', $sOne2);
			            $aParams[$aSplitParams[0]] = $aSplitParams[1];
			        }

			        $sContent = str_replace($aOne[0], $oFunction->replaceBy($aParams), $sContent);
			    }
			}
		}

		//*****************************************************************************************************************************
		// variables: {include model}
		//*****************************************************************************************************************************

		if (preg_match('|\{include model\}|', $sContent)) {

			if ($this->_bIsMobile && file_exists(self::$_sBasePath.str_replace('.tpl', 'Mobile.tpl', $_aProtectedVar['model']))) {

				$this->_transform(file_get_contents(self::$_sBasePath.str_replace('.tpl', 'Mobile.tpl', $_aProtectedVar['model'])), str_replace('.tpl', 'Mobile.tpl', $_aProtectedVar['model']));
			}
			else {

				$this->_transform(file_get_contents(self::$_sBasePath.$sModelname), $sModelname);
			}
		}

		//*****************************************************************************************************************************
		// variables: {if $foo > 3}{elseif $foo > 3}{else}{/if}
		//				{foreachelse} execute program if the array of foreach is empty
		//				{/foreach} to close foreach
		//*****************************************************************************************************************************

		$sContent = preg_replace('|\{if ([^\}]+)\}|', '<?php if ($1) { ?>', $sContent);
		$sContent = preg_replace('|\{elseif ([^\}]+)\}|', '<?php } else if ($1) { ?>', $sContent);
		$sContent = str_replace(array('{else}', '{foreachelse}'), '<?php } else { ?>', $sContent);
		$sContent = str_replace('{/foreach}', '<?php }} ?>', $sContent);
		$sContent = str_replace(array('{/if}', '{/section}'), '<?php } ?>', $sContent);

		//*****************************************************************************************************************************
		// finition
		//*****************************************************************************************************************************

		//$sContent = preg_replace('|\{|msi', '<?php ', $sContent);
		//$sContent = preg_replace('|\}|msi', ' ? >', $sContent);

		while (preg_match('|(<<<EOF(?:(?<!EOF;).)+?)#DOLLAR#(.+?EOF;)|msi', $sContent)) {

			$sContent = preg_replace('|(<<<EOF(?:(?<!EOF;).)+?)#DOLLAR#(.+?EOF;)|msi', '$1'.'\\\$'.'$2', $sContent);
		}

		$sContent .= "\n".'<?php /* '.print_r(str_replace('\\\\\\', '/', $sTmpDirectory).$this->_getEncodeTemplateName($sTemplateName).'.cac.php', true).' */ ?>';
		$sContent .= "\n".'<?php /* template : '.$sTemplateName.' */ ?>';
		$sContent .= "\n".'<?php /* '.print_r(file_put_contents(str_replace('\\\\\\', '/', $sTmpDirectory).$this->_getEncodeTemplateName($sTemplateName).'.cac.php', $sContent), true).' */ ?>';
		$sContent .= "\n".'<?php /* '.str_replace('\\\\\\', '/', $sTmpDirectory).' = '.$sTemplateName.' = '.md5($sTemplateName).' */ ?>';
	
		if ($bFirst === true) {

			include(str_replace('\\\\\\', '/', $sTmpDirectory).$this->_getEncodeTemplateName($sTemplateName).'.cac.php');
		}
	}
784148
protected function renderNavigation(AbstractContainer $container, array $options)
    {
        // Start html
        $html = $this->renderNavbarContainerHeader($options)
            . $this->renderNavbarMenu($container, $options);

        // Add form if applicable
        if ($options['useForm']) {
            $html .= $this->renderNavbarForm($options);
        }

        // Add right aligned menu
        if ($options['rightMenu']) {
            $html .= $this->renderNavbarRightMenu($options);
        }

        // Finish html
        $html .= $this->renderNavbarContainerFooter();
        return $html;
    }
322693
public function __toHtml($submitted = false, $blnSimpleLayout = false, $blnLabel = true, $blnDisplayErrors = true, $intCount = 0)
    {
        return $this->toHtml($submitted, $blnSimpleLayout, $blnLabel, $blnDisplayErrors);
    }
822797
public function isContentEmpty($isFirst = false, $isMiddle = false, $isLast = false)
    {
        return !(
            $this->isHeaderShown($isFirst, $isMiddle, $isLast) ||
            $this->isDetailsShown($isFirst, $isMiddle, $isLast) ||
            $this->isSummaryShown($isFirst, $isMiddle, $isLast) ||
            $this->isContentShown($isFirst, $isMiddle, $isLast) ||
            $this->isFooterShown($isFirst, $isMiddle, $isLast)
        );
    }