ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
environment.php File Reference

Go to the source code of this file.

Functions

 environment ()
 

Function Documentation

◆ environment()

environment ( )

Definition at line 3 of file environment.php.

4{
5 $totals = function ($answers) {
6 $ret = '<table>';
7 $ret .= '<tr><td></td>'
8 . '<td>Amount</td>'
9 . '<td style="padding-left: 10px;">Proportion</td></tr>';
10
11 foreach ($answers as $answer) {
12 $ret .= '<tr>'
13 . '<td style="padding-right: 10px;">' . $answer['title'] . '</td>'
14 . '<td align="right">' . $answer['amount'] . '</td>'
15 . '<td align="right">' . $answer['proportion'] . '%</td>'
16 . '</tr>';
17 }
18
19 $ret .= '</table><br>';
20 return $ret;
21 };
22
23
24 $chart = function ($answers) {
25 $ret = '<table style="width:100%">';
26 foreach ($answers as $answer) {
27 $ret .= '<tr style="border-bottom: 1px solid black;">'
28 . '<td style="width: 200px;">'
29 . $answer['title']
30 . '</td><td>'
31 . '<div style="background-color:grey; height:20px; width:' . $answer['proportion'] . '%;"></div>'
32 . '</td></tr>';
33 }
34 $ret .= '</table>';
35 return $ret;
36 };
37
38 return array(
39 'totals' => $totals,
40 'chart' => $chart
41 );
42}
$ret
Definition: parser.php:6

References $ret.

Referenced by ILIAS\Setup\ObjectiveIterator\__construct(), base1(), ILIAS\Setup\ObjectiveIterator\setEnvironment(), ILIAS\Tests\Setup\ArrayEnvironmentTest\setUp(), ILIAS\Tests\Setup\ArrayEnvironmentTest\testConfigFor(), ILIAS\Tests\Setup\ArrayEnvironmentTest\testDuplicateConfigFor(), ILIAS\Tests\Setup\ArrayEnvironmentTest\testGetResource(), ILIAS\Tests\Setup\ArrayEnvironmentTest\testSetResourceRejectsDuplicates(), ILIAS\Tests\Setup\ArrayEnvironmentTest\testWithResource(), and ILIAS\Tests\Setup\ArrayEnvironmentTest\testWrongConfigId().

+ Here is the caller graph for this function: