Ejemplo n.º 1
0
 function __construct($template_id)
 {
     $this->_template_id = $template_id;
     $context_options = cache_get('maestro_taskclass_info');
     // Test if context options are cached - if not then we will set it
     // The class function getContextMenu will read options from the cache
     if ($context_options === FALSE) {
         $context_options = array();
         // Scan through each available class type and fetch its corresponding context menu.
         foreach (module_implements('maestro_get_taskobject_info') as $module) {
             $function = $module . '_maestro_get_taskobject_info';
             if ($arr = $function()) {
                 $context_options = maestro_array_add($context_options, $arr);
             }
         }
         cache_set('maestro_taskclass_info', $context_options);
     }
     $handler_options = cache_get('maestro_handler_options');
     // Test if task type handler options are cached - if not then we will set it
     // The class function getHandlerOptions will read options from the cache
     if ($handler_options === FALSE) {
         // Scan through each available class type and fetch its corresponding context menu.
         foreach (module_implements('maestro_handler_options') as $module) {
             $function = $module . '_maestro_handler_options';
             if ($arr = $function()) {
                 $handler_options = maestro_array_merge_keys($arr, $handler_options);
             }
         }
         cache_set('maestro_handler_options', $handler_options);
     }
 }
 function getSetMethods()
 {
     $set_process_variable_methods = cache_get('maestro_set_process_variable_methods');
     if ($set_process_variable_methods === FALSE) {
         $set_process_variable_methods = array();
         foreach (module_implements('maestro_set_process_variable_methods') as $module) {
             $function = $module . '_maestro_set_process_variable_methods';
             if ($arr = $function()) {
                 $set_process_variable_methods = maestro_array_merge_keys($set_process_variable_methods, $arr);
             }
         }
         cache_set('maestro_set_process_variable_methods', $set_process_variable_methods);
     }
     $methods = cache_get('maestro_set_process_variable_methods');
     return $methods->data;
 }