relation.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <?php
  2. /**
  3. * @return object
  4. * @param int $id
  5. */
  6. public function getRelationByID($id)
  7. {
  8. return $this->loadExtension('relation')->getRelationByID($id);
  9. }
  10. /**
  11. * @param int $excludedID
  12. */
  13. public function getAllRelationName($excludedID = 0)
  14. {
  15. return $this->loadExtension('relation')->getAllRelationName($excludedID);
  16. }
  17. /**
  18. * @param mixed[] $formData
  19. */
  20. public function createRelation($formData)
  21. {
  22. $this->loadExtension('relation')->createRelation($formData);
  23. }
  24. /**
  25. * @param int $id
  26. * @param mixed[] $formData
  27. */
  28. public function editRelation($id, $formData)
  29. {
  30. return $this->loadExtension('relation')->editRelation($id, $formData);
  31. }
  32. /**
  33. * @param int $key
  34. */
  35. public function getRelationObjectCount($key = 0)
  36. {
  37. return $this->loadExtension('relation')->getRelationObjectCount($key);
  38. }
  39. /**
  40. * @param string $objectType
  41. * @param string $browseType
  42. * @param string $orderBy
  43. * @param int $excludedID
  44. */
  45. public function getObjects($objectType, $browseType = '', $orderBy = 'id_desc', $pager = null, $excludedID = 0)
  46. {
  47. return $this->loadExtension('relation')->getObjects($objectType, $browseType, $orderBy, $pager, $excludedID);
  48. }
  49. /**
  50. * @param string $objectType
  51. */
  52. public function getObjectCols($objectType)
  53. {
  54. return $this->loadExtension('relation')->getObjectCols($objectType);
  55. }
  56. /**
  57. * @param bool $getParis
  58. * @param bool $addDefault
  59. */
  60. public function getRelationList($getParis = false, $addDefault = false)
  61. {
  62. return $this->loadExtension('relation')->getRelationList($getParis, $addDefault);
  63. }
  64. /**
  65. * @param int $objectID
  66. * @param string $objectType
  67. * @param mixed[] $objectRelation
  68. * @param string $relatedObjectType
  69. */
  70. public function relateObject($objectID, $objectType, $objectRelation, $relatedObjectType)
  71. {
  72. return $this->loadExtension('relation')->relateObject($objectID, $objectType, $objectRelation, $relatedObjectType);
  73. }
  74. /**
  75. * @param int $objectID
  76. * @param string $objectType
  77. * @param string $relationName
  78. * @param int $relatedObjectID
  79. * @param string $relatedObjectType
  80. */
  81. public function removeObjects($objectID, $objectType, $relationName, $relatedObjectID, $relatedObjectType)
  82. {
  83. return $this->loadExtension('relation')->removeObjects($objectID, $objectType, $relationName, $relatedObjectID, $relatedObjectType);
  84. }
  85. /**
  86. * @param mixed[] $objectList
  87. */
  88. public function getObjectInfoByType($objectList)
  89. {
  90. return $this->loadExtension('relation')->getObjectInfoByType($objectList);
  91. }
  92. /**
  93. * @param int|mixed[] $objectID
  94. * @return mixed[]|int
  95. * @param string $objectType
  96. * @param string $browseType
  97. * @param bool $getCount
  98. */
  99. public function getRelatedObjectList($objectID, $objectType, $browseType = 'byRelation', $getCount = false)
  100. {
  101. return $this->loadExtension('relation')->getRelatedObjectList($objectID, $objectType, $browseType, $getCount);
  102. }
  103. public function setConfig4Workflow()
  104. {
  105. return $this->loadExtension('relation')->setConfig4Workflow();
  106. }