Fixed issue with hvar helper function
[haanga.git] / tests / tmp / assert_templates / ifchanged.tpl.php
blob1f5659c3fe6416a1eeacec8c9cca8ab71ed0806d
1 <?php
2 $HAANGA_VERSION = '1.0.3';
3 /* Generated from /home/crodas/projects/playground/haanga/tests/assert_templates/ifchanged.tpl */
4 function haanga_be17029b5fd2998df7c922a92652b6886d7780fd($vars, $return=FALSE, $blocks=array())
6 global $test_global, $global1;
7 extract($vars);
8 if ($return == TRUE) {
9 ob_start();
11 $sorted_users = $users;
12 $field = Array();
13 foreach ($sorted_users as $key => $item) {
14 $field[$key] = $item[$regroup_field];
16 array_multisort($field, SORT_REGULAR, $sorted_users);
17 echo '
19 foreach ($sorted_users as $user) {
20 echo '
22 $buffer1 = 'Users with '.htmlspecialchars($user['age']).' years';
23 if (isset($ifchanged1) == FALSE || $ifchanged1 != $buffer1) {
24 echo $buffer1;
25 $ifchanged1 = $buffer1;
27 echo '
28 '.htmlspecialchars($user['name']).'
31 echo '
34 foreach ($sorted_users as $user) {
35 echo '
37 if ((isset($ifchanged2[0]) == FALSE || $ifchanged2[0] != $user['age']) && (isset($ifchanged2[1]) == FALSE || $ifchanged2[1] != $user['foo'])) {
38 echo 'Users with '.htmlspecialchars($user['age']).' years';
39 $ifchanged2 = Array($user['age'], $user['foo']);
40 } else {
41 echo 'continue';
43 echo '
44 '.htmlspecialchars($user['name']).'
47 echo '
49 if ($return == TRUE) {
50 return ob_get_clean();