Documentation

AjaxController.php

Table of Contents

Classes

AjaxController

Functions

bb_register_AJAX_api()  : void
Registers a AJAX API method

Functions

bb_register_AJAX_api()

Registers a AJAX API method

bb_register_AJAX_api(AjaxController $instance, mixed $alias, callable $function[, bool $requiresAuth = false ][, mixed $requiredPermission = null ][, mixed $requiredFields = null ]) : void
Parameters
$instance : AjaxController
$alias : mixed

Path of the AJAX API (e.g. "category/method")

$function : callable

The function that should be called when the API is requested (must accept one parameter for the payload)

$requiresAuth : bool = false

True if the API requires authentication

$requiredPermission : mixed = null

The permission that is required to access the API if it requires authentication

$requiredFields : mixed = null

The fields that are required in the payload


        
On this page

Search results