ILIAS  trunk Revision v11.0_alpha-1811-gd2d5443e411
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
base.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
46 function base()
47 {
48  //init Factory and Renderer
49  global $DIC;
50  $f = $DIC->ui()->factory()->listing()->workflow();
51  $renderer = $DIC->ui()->renderer();
52 
53  //setup steps
54  $step = $f->step('', '');
55  $steps = [
56  $f->step('available, successfully completed', '(1)')
57  ->withAvailability($step::AVAILABLE)->withStatus($step::SUCCESSFULLY),
58  $f->step('available, unsuccessfully completed', '(2)')
59  ->withAvailability($step::AVAILABLE)->withStatus($step::UNSUCCESSFULLY),
60  $f->step('available, not started', '(3)')
61  ->withAvailability($step::AVAILABLE)->withStatus($step::NOT_STARTED),
62  $f->step('available, in progress', '(4)')
63  ->withAvailability($step::AVAILABLE)->withStatus($step::IN_PROGRESS),
64  $f->step('available, in progress, active (by workflow)', '(5)')
65  ->withAvailability($step::AVAILABLE)->withStatus($step::IN_PROGRESS),
66  $f->step('not available, not started', '(6)')
67  ->withAvailability($step::NOT_AVAILABLE)->withStatus($step::NOT_STARTED),
68  $f->step('not available, in progress', '(7)')
69  ->withAvailability($step::NOT_AVAILABLE)->withStatus($step::IN_PROGRESS),
70  $f->step('not available, successfully completed', '(8)')
71  ->withAvailability($step::NOT_AVAILABLE)->withStatus($step::SUCCESSFULLY),
72  $f->step('not available, unsuccessfully completed', '(9)')
73  ->withAvailability($step::NOT_AVAILABLE)->withStatus($step::UNSUCCESSFULLY),
74  $f->step('not available anymore, not started', '(10)')
75  ->withAvailability($step::NOT_ANYMORE)->withStatus($step::NOT_STARTED),
76  $f->step('not available anymore, in progress', '(11)')
77  ->withAvailability($step::NOT_ANYMORE)->withStatus($step::IN_PROGRESS),
78  $f->step('not available anymore, successfully completed', '(12)')
79  ->withAvailability($step::NOT_ANYMORE)->withStatus($step::SUCCESSFULLY),
80  $f->step('not available anymore, unsuccessfully completed', '(13)')
81  ->withAvailability($step::NOT_ANYMORE)->withStatus($step::UNSUCCESSFULLY),
82  ];
83 
84  //setup linear workflow
85  $wf = $f->linear('Linear Workflow', $steps)
86  ->withActive(4);
87 
88  //render
89  return $renderer->render($wf);
90 }
base()
description: > Example for rendering a workflow list with steps.
Definition: base.php:46
$renderer
global $DIC
Definition: shib_login.php:22