فهرست منبع

getAllEventids function added

szollosil 1 سال پیش
والد
کامیت
be813488be
1فایلهای تغییر یافته به همراه21 افزوده شده و 0 حذف شده
  1. 21 0
      custom/bbus/class/api_bbus.class.php

+ 21 - 0
custom/bbus/class/api_bbus.class.php

@@ -2352,4 +2352,25 @@ class BBus extends DolibarrApi
 		}
 		return $array;
 	}
+
+	/**
+	 * Get events ids
+	 *  
+	 * @return array|mixed Data without useless information
+	 * 
+	 * @url POST /getAllEventids
+	 */
+	public function getAllEventids()
+	{
+		global $db;
+		$array = [];
+		$sql = "SELECT rowid FROM llx_bbus_basicservices WHERE is_event = '1'";
+		$result = $db->query($sql);
+		if($db->num_rows($result) > 0){
+			while($row = $db->fetch_object($result)){
+				$array[] = $row->rowid;
+			}
+		}
+		return $array;
+	}
 }