PHP Class Gdn_ApplicationManager, vanilla

Author: Mark O'Sullivan
Afficher le fichier Open project: vanilla/vanilla Class Usage Examples

Méthodes publiques

Свойство Type Description
$Paths The valid paths to search for applications.

Méthodes publiques

Méthode 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 méthode

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

availableApplications() public méthode

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 méthode

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

checkApplication() public méthode

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

checkRequirements() public méthode

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 méthode

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

enableApplication() public méthode

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

enabledApplicationFolders() public méthode

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

enabledApplications() public méthode

Gets an array of all of the enabled applications.
public enabledApplications ( ) : array
Résultat array

enabledVisibleApplications() public méthode

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

getApplicationInfo() public méthode

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.
Résultat boolean | mixed Returns the application's info, a specific value, or false if the application cannot be found.

isEnabled() public méthode

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

registerPermissions() public méthode

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

testApplication() public méthode

Test if an application can be enabled.
public testApplication ( string $applicationName ) : boolean
$applicationName string The name of the application to test.
Résultat 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