test TestLoop on Tpex
This commit is contained in:
@@ -159,8 +159,11 @@ class Parser implements ParserInterface
|
|||||||
array(),
|
array(),
|
||||||
array(
|
array(
|
||||||
"secure" => "Thelia\Core\Template\BaseParam\Secure"
|
"secure" => "Thelia\Core\Template\BaseParam\Secure"
|
||||||
)
|
),
|
||||||
);
|
array(
|
||||||
|
"equal" => "Test\TestLoop\Equal"
|
||||||
|
)
|
||||||
|
);
|
||||||
$this->setContent($tpex->execute());
|
$this->setContent($tpex->execute());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Submodule core/lib/Thelia/Tpex updated: 3558c816e2...ecf90ef2b8
14
local/plugins/Test/TestLoop/Equal.php
Normal file
14
local/plugins/Test/TestLoop/Equal.php
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Test\TestLoop;
|
||||||
|
|
||||||
|
use Thelia\Tpex\Element\TestLoop\BaseTestLoop;
|
||||||
|
|
||||||
|
class Equal extends BaseTestLoop
|
||||||
|
{
|
||||||
|
|
||||||
|
public function exec($variable, $value)
|
||||||
|
{
|
||||||
|
return $variable == $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,7 +15,11 @@
|
|||||||
</THELIA_FU>
|
</THELIA_FU>
|
||||||
</THELIA_FOO>
|
</THELIA_FOO>
|
||||||
|
|
||||||
|
<TEST_equel test="equal" variable="3" value="1">
|
||||||
|
test vrai
|
||||||
|
</TEST_equel>
|
||||||
|
test faux
|
||||||
|
<//TEST_equel>
|
||||||
<REM>
|
<REM>
|
||||||
<REPEAT_loopy start="1" end="5" increment="2">
|
<REPEAT_loopy start="1" end="5" increment="2">
|
||||||
Compteur = #INDEX<br />
|
Compteur = #INDEX<br />
|
||||||
|
|||||||
Reference in New Issue
Block a user