/**
  * Initialize the component with configured values. To preload workflows, set configuration
  * setting 'preload' to an array containing all workflows to preload. If no preload is set
  * workflows are loaded on demand.
  *
  * @see SWWorkflowSource
  */
 public function init()
 {
     parent::init();
     $this->_workflowBasePath = Yii::getPathOfAlias($this->basePath);
     if (is_array($this->preload) and count($this->preload) != 0) {
         foreach ($this->preload as $wfId) {
             $this->_load($wfId, true);
         }
     }
     if ($this->definitionType == 'class') {
         Yii::import($this->basePath . '.*');
     }
 }
Ejemplo n.º 2
0
 /**
  * Initialize the component with configured values. To preload workflows, set configuration
  * setting 'preload' to an array containing all workflows to preload. If no preload is set
  * workflows are loaded on demand.
  *
  * @see SWWorkflowSource
  */
 public function init()
 {
     parent::init();
     if ($this->basePath === null) {
         $this->basePath = Yii::getPathOfAlias('application.workflows');
     }
     if (is_array($this->preload) and count($this->preload) != 0) {
         foreach ($this->preload as $wfId) {
             Yii::t('simpleWorkflow', 'preloading workflow : {name}', array('{name}' => $wfId));
             $this->_load($wfId);
         }
     }
     Yii::trace(Yii::t('simpleWorkflow', 'SWWorkflowSource initialized - basePath : ' . $this->basePath), 'application.simpleWorkflow');
 }
 /**
  * Initialize the component with configured values. To preload workflows, set configuration
  * setting 'preload' to an array containing all workflows to preload. If no preload is set
  * workflows are loaded on demand.
  *
  * @see SWWorkflowSource
  */
 public function init()
 {
     parent::init();
     $this->_workflowBasePath = Yii::getPathOfAlias($this->basePath);
     if (is_array($this->preload) and count($this->preload) != 0) {
         foreach ($this->preload as $wfId) {
             Yii::t('simpleWorkflow', 'preloading workflow : {name}', array('{name}' => $wfId));
             $this->_load($wfId, true);
         }
     }
     if ($this->definitionType == 'class') {
         Yii::import($this->basePath . '.*');
     }
     Yii::trace(Yii::t('simpleWorkflow', 'SWWorkflowSource initialized - basePath : ' . $this->basePath), 'application.simpleWorkflow');
 }