You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I forked your amazing repository, because I wish use a value of a Userfield in the "incl/processing.inc.php"
But it was unsuccessful...
How could I create a variable to use this userfield:
And use it in "incl/processing.inc.php".
I tried to modified "incl/api.inc.php", and "db.inc.php", but I don't modify as expected, because it doesn't work...
Could you help me ?
Thank you !!!
The text was updated successfully, but these errors were encountered:
class GrocyProduct {
public $quantiteAConsommer;
public static function parseUserfieldsInfo(array $infoArray): GrocyProduct {
checkIfNumeric($infoArray["id"]);
$result = new GrocyProduct();
$result->quantiteAConsommer = $infoArray["QuantiteAConsommer"];
return $result;
}
class API {
public static function getUserfields(int $productId): ?GrocyProduct {
$url = API_USERFIELDS . "/" . $productId;
$result = null; // Assure assignment in event curl throws exception.
$curl = new CurlGenerator($url);
try {
$result = $curl->execute(true);
} catch (Exception $e) {
self::processError($e, "Could not lookup Grocy product info");
}
if ($result != null) {
if (isset($result["userfields"])) {
return GrocyProduct::parseUserfieldsInfo($result);
} else {
return null;
}
}
return null;
}
}
Hi !
I forked your amazing repository, because I wish use a value of a Userfield in the "incl/processing.inc.php"
But it was unsuccessful...
How could I create a variable to use this userfield:
And use it in "incl/processing.inc.php".
I tried to modified "incl/api.inc.php", and "db.inc.php", but I don't modify as expected, because it doesn't work...
Could you help me ?
Thank you !!!
The text was updated successfully, but these errors were encountered: