/** * Builds Project Data Structure * * @return array */ protected function buildData() { $data = array(); $data["metadata"] = $this->getMetadata(); $data["metadata"]["workspace"] = defined("SYS_SYS") ? SYS_SYS : "Unknown"; $data["metadata"]["name"] = $this->getProjectName(); $data["metadata"]["uid"] = $this->getProjectUid(); $bpmnStruct["ACTIVITY"] = \BpmnActivity::getAll($this->prjUid); $bpmnStruct["ARTIFACT"] = \BpmnArtifact::getAll($this->prjUid); $bpmnStruct["BOUND"] = \BpmnBound::getAll($this->prjUid); $bpmnStruct["DATA"] = \BpmnData::getAll($this->prjUid); $bpmnStruct["DIAGRAM"] = \BpmnDiagram::getAll($this->prjUid); $bpmnStruct["DOCUMENTATION"] = array(); $bpmnStruct["EVENT"] = \BpmnEvent::getAll($this->prjUid); $bpmnStruct["EXTENSION"] = array(); $bpmnStruct["FLOW"] = \BpmnFlow::getAll($this->prjUid, null, null, "", CASE_UPPER, false); $bpmnStruct["GATEWAY"] = \BpmnGateway::getAll($this->prjUid); $bpmnStruct["LANE"] = \BpmnLane::getAll($this->prjUid); $bpmnStruct["LANESET"] = \BpmnLaneset::getAll($this->prjUid); $bpmnStruct["PARTICIPANT"] = \BpmnParticipant::getAll($this->prjUid); $bpmnStruct["PROCESS"] = \BpmnProcess::getAll($this->prjUid); $bpmnStruct["PROJECT"] = array(\BpmnProjectPeer::retrieveByPK($this->prjUid)->toArray()); $workflow = new \ProcessMaker\Project\Workflow(); list($workflowData, $workflowFile) = $workflow->getData($this->prjUid); $data["bpmn-definition"] = $bpmnStruct; $data["workflow-definition"] = $workflowData; $data["workflow-files"] = $workflowFile; return $data; }
public function getLanes($start = null, $limit = null, $filter = '', $changeCaseTo = CASE_UPPER) { if (is_array($start)) { extract($start); } $filter = $changeCaseTo != CASE_UPPER ? array_map("strtolower", self::$excludeFields["lane"]) : self::$excludeFields["lane"]; return self::filterCollectionArrayKeys( Lane::getAll($this->getUid(), $start, $limit, $filter, $changeCaseTo), $filter ); }