Documentation

Module
in package
implements ModuleInterface

AbstractYes

Base module class.

For built-in (classic) modules, the migration is relatively simple:

class HomePageModule extends Module
{
    uses ModuleSiteTrait;
}
  • anchors the module path to the class directory
  • loads sprout_load.php and admin_load.php files (if present, co-located in the directory)
  • module name is derived from the class, e.g. 'HomePage'.

Table of Contents

Interfaces

ModuleInterface
Interface for SproutCMS modules.

Methods

getName()  : string
Get the name of this module.
getPath()  : string
Get the absolute path of this module.
isLoaded()  : bool
loadAdmin()  : void
Execute admin setup.
loadSprout()  : void
Execute initial setup.

Methods

getName()

Get the name of this module.

public static getName() : string
Tags
inheritdoc
Return values
string

getPath()

Get the absolute path of this module.

public getPath() : string
Tags
inheritdoc
Return values
string

isLoaded()

public isLoaded([string $type = 'sprout' ]) : bool
Parameters
$type : string = 'sprout'
Tags
inheritdoc
Return values
bool

loadAdmin()

Execute admin setup.

public loadAdmin() : void
Tags
inheritdoc

loadSprout()

Execute initial setup.

public loadSprout() : void
Tags
inheritdoc
On this page

Search results