Dit product is onderdeel van Infowijs - een studio met maarschappelijk hart.
  • PHP reference
  • Sandbox


class Sandbox\API

Adds additional methods for processing API requests.


error(integer $id)

Output an error using an error code (integer) or by using a message.


  • integer $id Error ID

boolean isTrue($input)

Check if an input variable evaluates to true, by checking if it is bool true, integer 1, string '1', string 'true' or string 'yes'.


  • $input

Return Value

  • boolean

sendNotifications(integer[] $users, string $body, string $link, mixed $context = null)

Helper function for sending notifications to users. Accepts an array of user ID's, string $body, which holds the text of the notification, and a $link.


  • integer[] $users List of user IDs
  • string $body
  • string $link
  • mixed $context


Check if the current user is a manager of the Community.

If not, die with permissions error (Error ID 1018).