Deutschland United States United Kingdom
ContentLion - Open Source CMS

internalcompilesectionelse.php

Blame | Last modification | View Log

<?php
/**
 * Smarty Internal Plugin Compile Sectionelse Class
 *
 * @package Smarty
 * @subpackage Compiler
 */

class Plugin_Smarty_InternalCompileSectionelse extends Plugin_Smarty_InternalCompileBase
{
    /**
     * Compiles code for the {sectionelse} tag
     *
     * @param  array  $args     array with attributes from parser
     * @param  object $compiler compiler object
     * @return string compiled code
     */

    public function compile($args, $compiler)
    {
        // check and get attributes
        $_attr = $this->getAttributes($compiler, $args);

        list($openTag, $nocache) = $this->closeTag($compiler, array('section'));
        $this->openTag($compiler, 'sectionelse', array('sectionelse', $nocache));

        return "<?php endfor; else: ?>";
    }

}