Ejemplo n.º 1
0
 /**
  * This method returns the workflow schema for a certain object type.
  *
  * @param string $objectType Name of treated object type.
  *
  * @return array|null The resulting workflow schema
  */
 public function getWorkflowSchema($objectType = '')
 {
     $schema = null;
     $schemaName = $this->getWorkflowName($objectType);
     if ($schemaName != '') {
         $schema = Zikula_Workflow_Util::loadSchema($schemaName, $this->name);
     }
     return $schema;
 }
Ejemplo n.º 2
0
 /**
  * Constructor.
  *
  * @param string $schema Schema.
  * @param string $module Module name.
  */
 public function __construct($schema, $module)
 {
     // load workflow schema
     $schema = Zikula_Workflow_Util::loadSchema($schema, $module);
     $this->id = $schema['workflow']['id'];
     $this->title = $schema['workflow']['title'];
     $this->description = $schema['workflow']['description'];
     $this->module = $module;
     $this->actionMap = $schema['actions'];
     $this->stateMap = $schema['states'];
     $this->workflowData = null;
 }