SproutCMS

This is the code documentation for the SproutCMS project

function extra()

Calls any 'extra' commands that might be provided by the controller

Method names will be prefixed with '_extra' and must be public
Names which are lower_cased will be converted to camelCase

Supports varargs - additional args are passed to the underlying function
Called method should return an array, with two keys:
    title     string    Main title
    content   string    HTML for the main content area

Usage

void $AdminController->extra ( string $class , string $method );

Example

class BookingAdminController extends ManagedAdminController {
    // Call with url admin/extra/booking/send_email/:record_id
    public function _extraSendEmail($record_id) {
        return ['title' => '...', 'content' => '...'];
    }
}

Arguments

  1. string $class
    $type The class name of the method to call (must extend ManagedAdminController)
  2. string $method
    The method name to call

Return value

  • void
    Outputs HTML