3 * Smarty Internal Plugin Compile Continue
4 * Compiles the {continue} tag
12 * Smarty Internal Plugin Compile Continue Class
15 * @subpackage Compiler
17 class Smarty_Internal_Compile_Continue extends Smarty_Internal_Compile_Break
21 * Compiles code for the {continue} tag
23 * @param array $args array with attributes from parser
24 * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
25 * @param array $parameter array with compilation parameter
27 * @return string compiled code
28 * @throws \SmartyCompilerException
30 public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
32 list($levels, $foreachLevels) = $this->checkLevels($args, $compiler, 'continue');
34 if ($foreachLevels > 1) {
35 /* @var Smarty_Internal_Compile_Foreach $foreachCompiler */
36 $foreachCompiler = $compiler->getTagCompiler('foreach');
37 $output .= $foreachCompiler->compileRestore($foreachLevels - 1);
39 $output .= "continue {$levels};?>";