ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
base.php File Reference

Go to the source code of this file.

Functions

 base ()
 

Function Documentation

◆ base()

base ( )

Definition at line 3 of file base.php.

References $DIC, Vendor\Package\$f, and $steps.

4 {
5  //init Factory and Renderer
6  global $DIC;
7  $f = $DIC->ui()->factory()->listing()->workflow();
8  $renderer = $DIC->ui()->renderer();
9 
10  //setup steps
11  $step = $f->step('', '');
12  $steps = [
13  $f->step('available, successfully completed', '(1)')
14  ->withAvailability($step::AVAILABLE)->withStatus($step::SUCCESSFULLY),
15  $f->step('available, unsuccessfully completed', '(2)')
16  ->withAvailability($step::AVAILABLE)->withStatus($step::UNSUCCESSFULLY),
17  $f->step('available, not started', '(3)')
18  ->withAvailability($step::AVAILABLE)->withStatus($step::NOT_STARTED),
19  $f->step('available, in progress', '(4)')
20  ->withAvailability($step::AVAILABLE)->withStatus($step::IN_PROGRESS),
21  $f->step('available, in progress, active (by workflow)', '(5)')
22  ->withAvailability($step::AVAILABLE)->withStatus($step::IN_PROGRESS),
23  $f->step('not available, not started', '(6)')
24  ->withAvailability($step::NOT_AVAILABLE)->withStatus($step::NOT_STARTED),
25  $f->step('not available, in progress', '(7)')
26  ->withAvailability($step::NOT_AVAILABLE)->withStatus($step::IN_PROGRESS),
27  $f->step('not available, successfully completed', '(8)')
28  ->withAvailability($step::NOT_AVAILABLE)->withStatus($step::SUCCESSFULLY),
29  $f->step('not available, unsuccessfully completed', '(9)')
30  ->withAvailability($step::NOT_AVAILABLE)->withStatus($step::UNSUCCESSFULLY),
31  $f->step('not available anymore, not started', '(10)')
32  ->withAvailability($step::NOT_ANYMORE)->withStatus($step::NOT_STARTED),
33  $f->step('not available anymore, in progress', '(11)')
34  ->withAvailability($step::NOT_ANYMORE)->withStatus($step::IN_PROGRESS),
35  $f->step('not available anymore, successfully completed', '(12)')
36  ->withAvailability($step::NOT_ANYMORE)->withStatus($step::SUCCESSFULLY),
37  $f->step('not available anymore, unsuccessfully completed', '(13)')
38  ->withAvailability($step::NOT_ANYMORE)->withStatus($step::UNSUCCESSFULLY),
39  ];
40 
41  //setup linear workflow
42  $wf = $f->linear('Linear Workflow', $steps)
43  ->withActive(4);
44 
45  //render
46  return $renderer->render($wf);
47 }
$steps
Definition: latex.php:3
$DIC
Definition: xapitoken.php:46