PHP Class PocketsPlugin, addons

Inheritance: extends Gdn_Plugin
Datei anzeigen Open project: vanilla/addons Class Usage Examples

Public Properties

Property Type Description
$Locations array
$TestMode Whether or not to display test items for all pockets.

Protected Properties

Property Type Description
$StateLoaded boolean
$_Counters Counters for the various locations.
$_PocketNames array
$_Pockets All of the pockets indexed by location.

Public Methods

Method Description
__construct ( ) PocketsPlugin constructor.
addPocket ( Pocket $Pocket ) Add a pocket to the plugin's array of pockets to process.
base_BeforeRenderAsset_Handler ( $Sender )
base_GetAppSettingsMenuItems_Handler ( $Sender ) Adds "Media" menu option to the Forum menu on the dashboard.
base_afterRenderAsset_handler ( $Sender )
base_beforeCommentDisplay_handler ( $Sender )
base_betweenDiscussion_handler ( $Sender )
base_betweenRenderAsset_handler ( $Sender )
base_render_before ( $Sender ) Add test mode to every page.
getLocationsArray ( ) : array
getPockets ( $Name ) : mixed
pocketString ( $Name, null $Data = null ) : mixed | string
pocketStringCb ( null $Match = null, boolean | false $SetArgs = false ) : string
processPockets ( $Sender, $Location, null $CountHint = null )
settingsController_pockets_create ( $Sender, array $Args = [] ) : mixed Main list for a pocket management.
setup ( ) Runs on enable.
structure ( ) Runs on utility/update.
testData ( $Sender ) derp?

Protected Methods

Method Description
_Edit ( $Sender, $PocketID ) : mixed
_add ( $Sender ) : mixed
_addEdit ( $Sender, boolean | false $PocketID = false ) : mixed
_delete ( $Sender, $PocketID ) : boolean
_index ( $Sender, $Args )
_loadState ( boolean | false $Force = false )
_saveState ( ) derp?
_var ( $Name, $Value ) : string

Method Details

_Edit() protected method

protected _Edit ( $Sender, $PocketID ) : mixed
$Sender
$PocketID
return mixed

__construct() public method

PocketsPlugin constructor.
public __construct ( )

_add() protected method

protected _add ( $Sender ) : mixed
$Sender
return mixed

_addEdit() protected method

protected _addEdit ( $Sender, boolean | false $PocketID = false ) : mixed
$Sender
$PocketID boolean | false
return mixed

_delete() protected method

protected _delete ( $Sender, $PocketID ) : boolean
$Sender
$PocketID
return boolean

_index() protected method

protected _index ( $Sender, $Args )
$Sender
$Args

_loadState() protected method

protected _loadState ( boolean | false $Force = false )
$Force boolean | false

_saveState() protected method

derp?
protected _saveState ( )

_var() protected static method

protected static _var ( $Name, $Value ) : string
$Name
$Value
return string

addPocket() public method

Add a pocket to the plugin's array of pockets to process.
public addPocket ( Pocket $Pocket )
$Pocket Pocket

base_BeforeRenderAsset_Handler() public method

public base_BeforeRenderAsset_Handler ( $Sender )
$Sender

base_GetAppSettingsMenuItems_Handler() public method

Adds "Media" menu option to the Forum menu on the dashboard.
public base_GetAppSettingsMenuItems_Handler ( $Sender )
$Sender

base_afterRenderAsset_handler() public method

public base_afterRenderAsset_handler ( $Sender )
$Sender

base_beforeCommentDisplay_handler() public method

public base_beforeCommentDisplay_handler ( $Sender )
$Sender

base_betweenDiscussion_handler() public method

public base_betweenDiscussion_handler ( $Sender )
$Sender

base_betweenRenderAsset_handler() public method

public base_betweenRenderAsset_handler ( $Sender )
$Sender

base_render_before() public method

Add test mode to every page.
public base_render_before ( $Sender )
$Sender

getLocationsArray() public method

public getLocationsArray ( ) : array
return array

getPockets() public method

public getPockets ( $Name ) : mixed
$Name
return mixed

pocketString() public static method

public static pocketString ( $Name, null $Data = null ) : mixed | string
$Name
$Data null
return mixed | string

pocketStringCb() public static method

public static pocketStringCb ( null $Match = null, boolean | false $SetArgs = false ) : string
$Match null
$SetArgs boolean | false
return string

processPockets() public method

public processPockets ( $Sender, $Location, null $CountHint = null )
$Sender
$Location
$CountHint null

settingsController_pockets_create() public method

Main list for a pocket management.
public settingsController_pockets_create ( $Sender, array $Args = [] ) : mixed
$Args array
return mixed

setup() public method

Runs on enable.
public setup ( )

structure() public method

Runs on utility/update.
public structure ( )

testData() public method

derp?
public testData ( $Sender )
$Sender

Property Details

$Locations public_oe property

public array $Locations
return array

$StateLoaded protected_oe property

protected bool $StateLoaded
return boolean

$TestMode public_oe property

Whether or not to display test items for all pockets.
public $TestMode

$_Counters protected_oe property

Counters for the various locations.
protected $_Counters

$_PocketNames protected_oe property

protected array $_PocketNames
return array

$_Pockets protected_oe property

All of the pockets indexed by location.
protected $_Pockets