ILIAS  trunk Revision v11.0_alpha-1861-g09f3d197f78
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 
33 function base()
34 {
35  //init Factory and Renderer
36  global $DIC;
37  $f = $DIC->ui()->factory()->listing()->workflow();
38  $renderer = $DIC->ui()->renderer();
39 
40  //setup steps
41  $step = $f->step('', '');
42  $steps = [
43  $f->step('step 1', 'available, successfully completed')
44  ->withAvailability($step::AVAILABLE)->withStatus($step::SUCCESSFULLY),
45  $f->step('step 2', 'available, successfully completed')
46  ->withAvailability($step::AVAILABLE)->withStatus($step::SUCCESSFULLY),
47  $f->step('step 3', 'available, in progress, active ')
48  ->withAvailability($step::AVAILABLE)->withStatus($step::IN_PROGRESS),
49  $f->step('step 4', 'not available, not started')
50  ->withAvailability($step::NOT_AVAILABLE)->withStatus($step::NOT_STARTED),
51  $f->step('step 5', 'not available, not started')
52  ->withAvailability($step::NOT_AVAILABLE)->withStatus($step::NOT_STARTED)
53  ];
54 
55  //setup linear workflow
56  $wf = $f->linear('Linear Workflow', $steps)
57  ->withActive(2);
58 
59  //render
60  return $renderer->render($wf);
61 }
$renderer
base()
description: > Example for rendering a linear workflow.
Definition: base.php:33
global $DIC
Definition: shib_login.php:22