Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
workflow_step.inc
1 <?php
18 require_once SQ_CORE_PACKAGE_PATH.'/folder/folder.inc';
19 
31 class Workflow_Step extends Folder
32 {
33 
34 
41  function __construct($assetid=0)
42  {
43  parent::__construct($assetid);
44 
45  }//end constructor
46 
47 
55  public function _getAllowedLinks()
56  {
57  return Array(
58  SQ_LINK_TYPE_1 => Array(),
59  SQ_LINK_TYPE_2 => Array(
60  'workflow_step_condition' => Array(
61  'card' => 'M',
62  'exclusive' => FALSE,
63  ),
64  'workflow_step' => Array(
65  'card' => 'M',
66  'exclusive' => FALSE,
67  ),
68  ),
69  SQ_LINK_TYPE_3 => Array(),
70  SQ_LINK_NOTICE => Array(),
71  );
72 
73  }//end _getAllowedLinks()
74 
75 
96  public function prepareLink(Asset $asset, $side_of_link, &$link_type, &$value, &$sort_order, &$dependant, &$exclusive)
97  {
98  // if this is a step condition then we need to make it a dependant and exclusive link
99  if ($side_of_link == 'major' && ($asset instanceof Workflow_Step_Condition) && ($dependant != '1' || $exclusive != '1')) {
100  $dependant = '1';
101  $exclusive = '1';
102  return TRUE;
103  }
104 
105  return FALSE;
106 
107  }//end prepareLink()
108 
109 
110 }//end class
111 
112 ?>