flow.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <?php
  2. /**
  3. * Post data of a flow.
  4. *
  5. * @param object $flow
  6. * @param object $action
  7. * @param int $dataID
  8. * @param string $prevModule
  9. * @access public
  10. * @return array
  11. */
  12. public function post($flow, $action, $dataID = 0, $prevModule = '')
  13. {
  14. return $this->loadExtension('flow')->post($flow, $action, $dataID, $prevModule);
  15. }
  16. /**
  17. * Print workflow defined fields for view and form page.
  18. *
  19. * @access public
  20. * @param string $moduleName
  21. * @param string $methodName
  22. * @param object $object
  23. * @param string $type
  24. * @param string $extras
  25. * @return void
  26. */
  27. public function printFields($moduleName, $methodName, $object, $type, $extras = '')
  28. {
  29. return $this->loadExtension('flow')->printFields($moduleName, $methodName, $object, $type, $extras);
  30. }
  31. /**
  32. * Get field value.
  33. *
  34. * @param string $field
  35. * @param object $object
  36. * @access public
  37. * @return string
  38. */
  39. public function getFieldValue($field, $object)
  40. {
  41. return $this->loadExtension('flow')->getFieldValue($field, $object);
  42. }
  43. /**
  44. * Print workflow defined fields for browse page.
  45. *
  46. * @access public
  47. * @param string $module
  48. * @param object $object
  49. * @param string $id
  50. * @param bool $returnResult true|false
  51. * @return void
  52. */
  53. public function printFlowCell($module, $object, $id, $returnResult = false)
  54. {
  55. return $this->loadExtension('flow')->printFlowCell($module, $object, $id, $returnResult);
  56. }
  57. /**
  58. * Import from excel.
  59. *
  60. * @param object $flow
  61. * @access public
  62. * @return array
  63. */
  64. public function import($flow)
  65. {
  66. return $this->loadExtension('flow')->import($flow);
  67. }
  68. /**
  69. * getFieldControl
  70. *
  71. * @param object $field
  72. * @param object $object
  73. * @param string $controlName
  74. * @param string $chosen
  75. * @access public
  76. * @return string
  77. */
  78. public function getFieldControl($field, $object, $controlName = '', $picker = 'picker-select')
  79. {
  80. return $this->loadExtension('flow')->getFieldControl($field, $object, $controlName, $picker);
  81. }
  82. public function buildControl($field, $fieldValue, $element = '', $childModule = '', $emptyValue = false, $preview = false)
  83. {
  84. return $this->loadExtension('flow')->buildControl($field, $fieldValue, $element, $childModule, $emptyValue, $preview);
  85. }
  86. public function checkLabel($flow, $labels, $label)
  87. {
  88. if($flow->buildin) return true;
  89. return parent::checkLabel($flow, $labels, $label);
  90. }
  91. public function getDataByID($flow, $dataID, $decode = true)
  92. {
  93. return $this->loadExtension('flow')->getDataByID($flow, $dataID, $decode);
  94. }
  95. public function buildOperateMenu($flow, $data, $type = 'browse')
  96. {
  97. return $this->loadExtension('flow')->buildOperateMenu($flow, $data, $type);
  98. }
  99. public function buildActionMenu($moduleName, $action, $data, $type = 'browse', $relations = array())
  100. {
  101. return $this->loadExtension('flow')->buildActionMenu($moduleName, $action, $data, $type, $relations);
  102. }
  103. public function processDBData($module, $data, $decode = true)
  104. {
  105. return $this->loadExtension('flow')->processDBData($module, $data, $decode);
  106. }
  107. public function setFlowChild($module, $action, $fields, $dataID = 0)
  108. {
  109. return $this->loadExtension('flow')->setFlowChild($module, $action, $fields, $dataID);
  110. }
  111. public function sendmail($flow, $method, $dataID, $actionID)
  112. {
  113. return $this->loadExtension('flow')->sendmail($flow, $method, $dataID, $actionID);
  114. }
  115. public function checkRules($fields, $data, $dao, $dataID = 0, $notEmptyRule = array(), $ruleList = array())
  116. {
  117. return $this->loadExtension('flow')->checkRules($fields, $data, $dao, $dataID, $notEmptyRule, $ruleList);
  118. }
  119. public function formatDataByType($chart, $datas, $fieldList)
  120. {
  121. return $this->loadExtension('flow')->formatDataByType($chart, $datas, $fieldList);
  122. }
  123. /**
  124. * Build batch actions of a flow.
  125. *
  126. * @param string $moduleName
  127. * @access public
  128. * @return string
  129. */
  130. public function buildBatchActions($moduleName)
  131. {
  132. return $this->loadExtension('flow')->buildBatchActions($moduleName);
  133. }
  134. public function getToList($flow, $dataID, $action)
  135. {
  136. return $this->loadExtension('flow')->getToList($flow, $dataID, $action);
  137. }