Fix: missing include api_categories class
This commit is contained in:
parent
db8d27f0fe
commit
f8f4ff6d21
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2016 Xebax Christy <xebax@wanadoo.fr>
|
||||
/* Copyright (C) 2016 Xebax Christy <xebax@wanadoo.fr>
|
||||
* Copyright (C) 2017 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -357,4 +358,26 @@ class Members extends DolibarrApi
|
||||
return $member->subscription($start_date, $amount, 0, '', $label, '', '', '', $end_date);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get categories for a member
|
||||
*
|
||||
* @param int $id ID of member
|
||||
* @param string $sortfield Sort field
|
||||
* @param string $sortorder Sort order
|
||||
* @param int $limit Limit for list
|
||||
* @param int $page Page number
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @url GET {id}/categories
|
||||
*/
|
||||
function getCategories($id, $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/api_categories.class.php';
|
||||
|
||||
$categories = new Categories();
|
||||
|
||||
return $categories->getListForItem($sortfield, $sortorder, $limit, $page, 'member', $id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -263,9 +263,13 @@ class Products extends DolibarrApi
|
||||
*
|
||||
* @url GET {id}/categories
|
||||
*/
|
||||
function getCategories($id, $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0) {
|
||||
$categories = new Categories();
|
||||
return $categories->getListForItem($sortfield, $sortorder, $limit, $page, 'product', $id);
|
||||
function getCategories($id, $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/api_categories.class.php';
|
||||
|
||||
$categories = new Categories();
|
||||
|
||||
return $categories->getListForItem($sortfield, $sortorder, $limit, $page, 'product', $id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -333,8 +333,12 @@ class Contacts extends DolibarrApi
|
||||
*
|
||||
* @url GET {id}/categories
|
||||
*/
|
||||
function getCategories($id, $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0) {
|
||||
function getCategories($id, $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/api_categories.class.php';
|
||||
|
||||
$categories = new Categories();
|
||||
|
||||
return $categories->getListForItem($sortfield, $sortorder, $limit, $page, 'contact', $id);
|
||||
}
|
||||
|
||||
|
||||
@ -266,8 +266,12 @@ class Thirdparties extends DolibarrApi
|
||||
*
|
||||
* @url GET {id}/categories
|
||||
*/
|
||||
function getCategories($id, $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0) {
|
||||
function getCategories($id, $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/api_categories.class.php';
|
||||
|
||||
$categories = new Categories();
|
||||
|
||||
return $categories->getListForItem($sortfield, $sortorder, $limit, $page, 'customer', $id);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user