public function loadFixtures(TBGScope $scope)
 {
     foreach (TBGIssueTypesTable::getTable()->getAllIDsByScopeID($scope->getID()) as $issuetype_id) {
         $crit = $this->getCriteria();
         $crit->addInsert(self::SCOPE, $scope->getID());
         $crit->addInsert(self::WORKFLOW_ID, TBGSettings::getCoreWorkflow()->getID());
         $crit->addInsert(self::WORKFLOW_SCHEME_ID, TBGSettings::getCoreWorkflowScheme()->getID());
         $crit->addInsert(self::ISSUETYPE_ID, $issuetype_id);
         $this->doInsert($crit);
     }
 }
示例#2
0
 /**
  * Whether this is the builtin workflow that cannot be
  * edited or removed
  *
  * @return boolean
  */
 public function isCore()
 {
     return $this->getID() == TBGSettings::getCoreWorkflow()->getID();
 }
 /**
  * Get all steps in this workflow
  *
  * @return array An array of TBGWorkflowStep objects
  */
 public function getWorkflowForIssuetype(TBGIssuetype $issuetype)
 {
     $this->_populateAssociatedWorkflows();
     if (array_key_exists($issuetype->getID(), $this->_issuetype_workflows)) {
         return $this->_issuetype_workflows[$issuetype->getID()];
     } else {
         return TBGSettings::getCoreWorkflow();
     }
 }