developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Ticket #130: block.lcmd.2.php

File block.lcmd.2.php, 868 bytes (added by Aubanel MONNIER, 13 years ago)

fixed non-exiting array bug

Line 
1<?php
2/**
3* @package    jelix
4* @subpackage jtpl_plugin
5* @version    $Id$
6* @author     Aubanel MONNIER
7* @copyright  2007 Aubanel MONNIER
8* @link        http://www.jelix.org
9* @licence    GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html
10*/
11
12/**
13 * a special to insert latex content
14 *
15 * usage : {lcmd <command>} .. calls the \<command>{} latex command
16 * @param jTplCompiler $compiler the template compiler
17 * @param boolean true if it is the begin of block, else false
18 * @param $param array  1=>latex command 2=>right value 3=>optional resource
19 * @return string the php code corresponding to the begin or end of the block
20 */
21function jtpl_block_lcmd($compiler, $begin, $param=array())
22{
23if ($begin){
24        $param[0];
25        return 'echo \'\\'.$param[0].'{\';';
26        }
27else return 'echo \'}\';';
28}
29
30
31?>