PHP Class Gdn_ApplicationManager, vanilla

Author: Mark O'Sullivan
Mostra file Open project: vanilla/vanilla Class Usage Examples

Public Properties

Property Type Description
$Paths The valid paths to search for applications.

Public Methods

Method Description
__construct ( AddonManager $addonManager = null )
availableApplications ( ) Get a list of the available applications.
availableVisibleApplications ( ) : array Get a list of applications that are not marked as invisible.
checkApplication ( string $applicationName ) : boolean Check to see if an application is enabled.
checkRequirements ( string $applicationName ) Check that the requirements for an application have been enabled.
disableApplication ( string $applicationName ) Disable an application.
enableApplication ( string $applicationName ) : boolean Enable an application.
enabledApplicationFolders ( ) : array Get an list of enabled application folders.
enabledApplications ( ) : array Gets an array of all of the enabled applications.
enabledVisibleApplications ( ) : array Get a list of applications that are enabled and not marked as invisible.
getApplicationInfo ( string $applicationName, string $key = null ) : boolean | mixed Get the information about an application.
isEnabled ( string $Name ) : boolean Check whether or not an application is enabled.
registerPermissions ( string $applicationName ) Define the permissions for an application.
testApplication ( string $applicationName ) : boolean Test if an application can be enabled.

Method Details

__construct() public method

public __construct ( AddonManager $addonManager = null )
$addonManager Vanilla\AddonManager

availableApplications() public method

Looks through the root Garden directory for valid applications and returns them as an associative array of "Application Name" => "Application Info Array". It also adds a "Folder" definition to the Application Info Array for each application.

availableVisibleApplications() public method

Get a list of applications that are not marked as invisible.
public availableVisibleApplications ( ) : array
return array Returns an array of application info arrays.

checkApplication() public method

Check to see if an application is enabled.
public checkApplication ( string $applicationName ) : boolean
$applicationName string The name of the application to check.
return boolean Returns true if the application is enabled, otherwise false.

checkRequirements() public method

Check that the requirements for an application have been enabled.
public checkRequirements ( string $applicationName )
$applicationName string The name of the application to check.

disableApplication() public method

Disable an application.
public disableApplication ( string $applicationName )
$applicationName string The name of the application to disable.

enableApplication() public method

Enable an application.
public enableApplication ( string $applicationName ) : boolean
$applicationName string The name of the application to enable.
return boolean Returns true if the application was enabled or false otherwise.

enabledApplicationFolders() public method

Get an list of enabled application folders.
Deprecation:
public enabledApplicationFolders ( ) : array
return array Returns an array of all of the enabled application folders.

enabledApplications() public method

Gets an array of all of the enabled applications.
public enabledApplications ( ) : array
return array

enabledVisibleApplications() public method

Get a list of applications that are enabled and not marked as invisible.
public enabledVisibleApplications ( ) : array
return array Returns an array of application info arrays.

getApplicationInfo() public method

Get the information about an application.
public getApplicationInfo ( string $applicationName, string $key = null ) : boolean | mixed
$applicationName string The name of the application to lookup.
$key string The key of a field in the application info to return.
return boolean | mixed Returns the application's info, a specific value, or false if the application cannot be found.

isEnabled() public method

Check whether or not an application is enabled.
Deprecation:
Since: 2.2
public isEnabled ( string $Name ) : boolean
$Name string The name of the application.
return boolean Whether or not the application is enabled.

registerPermissions() public method

Define the permissions for an application.
public registerPermissions ( string $applicationName )
$applicationName string The name of the application.

testApplication() public method

Test if an application can be enabled.
public testApplication ( string $applicationName ) : boolean
$applicationName string The name of the application to test.
return boolean Returns true if the application can be enabled or false otherwise.

Property Details

$Paths public_oe property

The valid paths to search for applications.
public $Paths