Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
trigger_action.inc
1 <?php
17 require_once SQ_INCLUDE_PATH.'/asset.inc';
18 
31 class Trigger_Action extends Asset
32 {
33 
34 
47  public static function execute($settings, $state)
48  {
49  return FALSE;
50 
51  }//end execute()
52 
53 
64  public static function getInterface($settings, $prefix, $write_access=FALSE)
65  {
66  // create HTML
67  // populate HTML with settings
68  // this should handle new (empty) conditions as well as saved ones
69 
70  // IMPORTANT NOTE:
71  // any Form elements that use the prefix should use the prefix as an array index
72  // i.e. <input name="$prefix['whatever']" value="someting" >
73  // or <input name="$prefix" value="something" >
74 
75  // NOT <input name="$prefix_something" />
76  // if you do this your processInterface function will not be getting any data back.
77 
78  // in short, you can either use prefix to either reference one value or be
79  // an array of values, you cannot change the prefix to whatever you like as it will
80  // a) conflict with some other prefix, or
81  // b) make the interface useless
82 
83  // see the trigger_action_set_status condition for an example of use
84 
85  return '';
86 
87  }//end getInterface()
88 
89 
102  public static function processInterface(&$settings, $request_data)
103  {
104  // take and check request data
105  // populate the settings
106  // return status
107 
108  return FALSE;
109 
110  }//end processInterface()
111 
112 
127  public static function getLocks($settings, &$state)
128  {
129  // by default no locks needed
130  return Array();
131 
132  }//end getLocks()
133 
134 
135 }//end class
136 
137 ?>