This commit is contained in:
bzick
2016-04-11 20:19:31 +03:00
parent 027075d7b5
commit d6aa777fd0
9 changed files with 55 additions and 8 deletions

View File

@ -1044,4 +1044,15 @@ class Compiler
}
return 'unset('.implode(", ", $unset).')';
}
public static function tagPaste(Tokenizer $tokens, Tag $tag)
{
$name = $tokens->get(T_CONSTANT_ENCAPSED_STRING);
$tokens->next();
if(isset($tag->tpl->blocks[$name])) {
return "?>".substr($tag->tpl->blocks[$name]["block"], 1, -1)."<?php ";
} else {
return "";
}
}
}