mirror of
https://github.com/smarty-php/smarty.git
synced 2025-10-19 15:35:20 +02:00
38 lines
1.0 KiB
PHP
38 lines
1.0 KiB
PHP
![]() |
<?php
|
||
|
/**
|
||
|
* Smarty Internal Plugin Compile Capture
|
||
|
*
|
||
|
* Compiles the {block} tag
|
||
|
*
|
||
|
* @package Smarty
|
||
|
* @subpackage Compiler
|
||
|
* @author Uwe Tews
|
||
|
*/
|
||
|
/**
|
||
|
* Smarty Internal Plugin Compile Block Class
|
||
|
*/
|
||
|
class Smarty_Internal_Compile_Block extends Smarty_Internal_CompileBase {
|
||
|
/**
|
||
|
* Compiles code for the {block} tag
|
||
|
*
|
||
|
* @param array $args array with attributes from parser
|
||
|
* @param object $compiler compiler object
|
||
|
* @return string compiled code
|
||
|
*/
|
||
|
public function compile($args, $compiler)
|
||
|
{
|
||
|
$this->compiler = $compiler;
|
||
|
$this->required_attributes = array('name');
|
||
|
$this->optional_attributes = array('assign');
|
||
|
// check and get attributes
|
||
|
$_attr = $this->_get_attributes($args);
|
||
|
$this->_open_tag('block', $_attr);
|
||
|
$compiler->template->extract_code = true;
|
||
|
$compiler->template->extracted_compiled_code = '';
|
||
|
$compiler->template->has_code = false;
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
?>
|