Pluf Framework

Pluf Framework Commit Details


Date:2008-12-05 04:51:24 (16 years 17 days ago)
Author:Loic d'Anterroches
Branch:develop, master
Commit:60175e41b2b82ecbce178a61bce55db3abef45f0
Parents: 1a7c3236effee77463c4741b9d71cb00756d4cf8
Message:Added a signal to modify the template tags and modifiers.

Changes:

File differences

src/Pluf/Template/Compiler.php
188188
189189
190190
191
192
193
194
195
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
196224
197225
198226
*/
function __construct($template_file, $folders=array(), $load=true)
{
$allowedtags = Pluf::f('template_tags', array());
$this->_allowedTags = array_merge($allowedtags, $this->_allowedTags);
$modifiers = Pluf::f('template_modifiers', array());
$this->_modifier = array_merge($modifiers, $this->_modifier);
/**
* [signal]
*
* Pluf_Template_Compiler::construct_template_tags_modifiers
*
* [sender]
*
* Pluf_Template_Compiler
*
* [description]
*
* This signal allows an application to dynamically modify the
* allowed template tags. The order of the merge with the ones
* configured in the configuration files and the default one
* is: default -> signal -> configuration file.
* That is, the configuration file is the highest authority.
*
* [parameters]
*
* array('tags' => array(),
* 'modifiers' => array());
*
*/
$params = array('tags' => array(),
'modifiers' => array());
Pluf_Signal::send('Pluf_Template_Compiler::construct_template_tags_modifiers',
'Pluf_Template_Compiler', $params);
$this->_allowedTags = array_merge($this->_allowedTags,
$params['tags'],
Pluf::f('template_tags', array()));
$this->_modifier = array_merge($this->_modifier,
$params['modifiers'],
Pluf::f('template_modifiers', array()));
foreach ($this->_allowedTags as $name=>$model) {
$this->_extraTags[$name] = new $model();
}

Archive Download the corresponding diff file

Branches

Tags

Number of commits:
Page rendered in 0.06119s using 13 queries.