Last change
on this file since 142 was
142,
checked in by fpvanagthoven, 14 years ago
|
- Added pipelineEditor.php, testing graphical pipeline creation.
- Added DisplayStep?.php, a visual representation of a contained Step (Questionnaire/Dashboard?/etc..) object in a pipeline. Allows icon-based presentation of pipeline.
- Fixed StyleSheet?.php class, can be passed string argument (style name) to choose different .css files.
- Added Logo class, basically the same as classes_old/Logo.php
- Added placeholder icons and some UI elemtent images for use in pipelineEditor.php
|
File size:
1.7 KB
|
Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | /** |
---|
4 | * DisplayStep object is the visual representation of an existing step in a pipeline, to be displayed in the pipeline sequencer. |
---|
5 | * Note: Can also be used for creation icons in the Toolbox, as long as no reference to an existing step object is assigned. |
---|
6 | * |
---|
7 | * IMPORTANT: DisplayStep() should only be used to graphically display a certain Step object. |
---|
8 | * It only contains a reference to an existing object ($reference), and is not the database object itself! |
---|
9 | * General idea: handle real objects privately, only generate DisplaySteps() based on that data, not the other way around. |
---|
10 | * |
---|
11 | * @author tschipper |
---|
12 | */ |
---|
13 | class DisplayStep { |
---|
14 | |
---|
15 | //put your code here |
---|
16 | private $type; |
---|
17 | private $reference; |
---|
18 | public $imageURL; |
---|
19 | public $selected = false; |
---|
20 | public $name; |
---|
21 | |
---|
22 | public function __construct($t, $ref=null, $n) { |
---|
23 | |
---|
24 | $this->type = $t; |
---|
25 | $this->reference = $ref; |
---|
26 | $this->name = $n; |
---|
27 | |
---|
28 | switch ($this->type) { |
---|
29 | case "Questionnaire": |
---|
30 | $this->imageURL = "images/icons/questionnaire2.png"; |
---|
31 | break; |
---|
32 | case "Dashboard": |
---|
33 | $this->imageURL = "images/icons/dashboard2.png"; |
---|
34 | break; |
---|
35 | case "Application": |
---|
36 | $this->imageURL = "images/icons/application2.png"; |
---|
37 | break; |
---|
38 | case "Notice": |
---|
39 | $this->imageURL = "images/icons/notice2.png"; |
---|
40 | break; |
---|
41 | default: |
---|
42 | $this->imageURL = null; |
---|
43 | break; |
---|
44 | } |
---|
45 | |
---|
46 | //output a display object |
---|
47 | echo '<div class="displayStep" style="background-image: url(\''; |
---|
48 | echo $this->imageURL; |
---|
49 | echo '\');" ><p>'.$this->name.'</p></div>'."\n"; |
---|
50 | |
---|
51 | } |
---|
52 | |
---|
53 | } |
---|
54 | |
---|
55 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.