PHP Class Grav\Plugin\AdminPlugin

Inheritance: extends Grav\Common\Plugin
Afficher le fichier Open project: getgrav/grav-plugin-admin

Méthodes publiques

Свойство Type Description
$features

Protected Properties

Свойство Type Description
$active boolean
$admin Grav\Plugin\Admin\Admin
$admin_route string
$base string
$popularity Grav\Plugin\Admin\Popularity
$route string
$session RocketTheme\Toolbox\Session\Session
$template string
$theme string
$uri Grav\Common\Uri
$version

Méthodes publiques

Méthode Description
getFormFieldTypes ( ) : array Get list of form field types specified in this plugin. Only special types needs to be listed.
getSubscribedEvents ( ) : array
isAdminPath ( ) : boolean Check if the current route is under the admin path
onAdminDashboard ( )
onAdminRegisterPermissions ( RocketTheme\Toolbox\Event\Event $e ) Initial stab at registering permissions (WIP)
onAssetsInitialized ( ) Handles initializing the assets
onFormProcessed ( RocketTheme\Toolbox\Event\Event $event ) Process the admin registration form.
onOutputGenerated ( )
onPagesInitialized ( ) Sets longer path to the home page allowing us to have list of pages when we enter to pages section.
onPluginsInitialized ( ) If the admin plugin is set as active, initialize the admin
onShutdown ( ) Handles the shutdown
onTaskGPM ( ) Handles getting GPM updates
onTwigExtensions ( ) Add the Admin Twig Extensions
onTwigSiteVariables ( ) Set all twig variables for generating output.
onTwigTemplatePaths ( ) Add twig paths to plugin templates.
setup ( ) If the admin path matches, initialize the Login plugin configuration and set the admin as active.

Méthodes protégées

Méthode Description
initializeAdmin ( ) Initialize the admin.
initializeController ( $task, $post )
validate ( string $type, string $value, string $extra = '' ) : boolean Validate a value. Currently validates

Method Details

getFormFieldTypes() public méthode

Get list of form field types specified in this plugin. Only special types needs to be listed.
public getFormFieldTypes ( ) : array
Résultat array

getSubscribedEvents() public static méthode

public static getSubscribedEvents ( ) : array
Résultat array

initializeAdmin() protected méthode

Initialize the admin.
protected initializeAdmin ( )

initializeController() protected méthode

protected initializeController ( $task, $post )

isAdminPath() public méthode

Check if the current route is under the admin path
public isAdminPath ( ) : boolean
Résultat boolean

onAdminDashboard() public méthode

public onAdminDashboard ( )

onAdminRegisterPermissions() public méthode

Initial stab at registering permissions (WIP)
public onAdminRegisterPermissions ( RocketTheme\Toolbox\Event\Event $e )
$e RocketTheme\Toolbox\Event\Event

onAssetsInitialized() public méthode

Handles initializing the assets
public onAssetsInitialized ( )

onFormProcessed() public méthode

Process the admin registration form.
public onFormProcessed ( RocketTheme\Toolbox\Event\Event $event )
$event RocketTheme\Toolbox\Event\Event

onOutputGenerated() public méthode

public onOutputGenerated ( )

onPagesInitialized() public méthode

Sets longer path to the home page allowing us to have list of pages when we enter to pages section.
public onPagesInitialized ( )

onPluginsInitialized() public méthode

If the admin plugin is set as active, initialize the admin

onShutdown() public méthode

Handles the shutdown
public onShutdown ( )

onTaskGPM() public méthode

Handles getting GPM updates
public onTaskGPM ( )

onTwigExtensions() public méthode

Add the Admin Twig Extensions
public onTwigExtensions ( )

onTwigSiteVariables() public méthode

Set all twig variables for generating output.
public onTwigSiteVariables ( )

onTwigTemplatePaths() public méthode

Add twig paths to plugin templates.
public onTwigTemplatePaths ( )

setup() public méthode

If the admin path matches, initialize the Login plugin configuration and set the admin as active.
public setup ( )

validate() protected méthode

- 'user' for username format and username availability. - 'password1' for password format - 'password2' for equality to password1
protected validate ( string $type, string $value, string $extra = '' ) : boolean
$type string The field type
$value string The field value
$extra string Any extra value required
Résultat boolean

Property Details

$active protected_oe property

protected bool $active
Résultat boolean

$admin protected_oe property

protected Admin,Grav\Plugin\Admin $admin
Résultat Grav\Plugin\Admin\Admin

$admin_route protected_oe property

protected string $admin_route
Résultat string

$base protected_oe property

protected string $base
Résultat string

$features public_oe property

public $features

$popularity protected_oe property

protected Popularity,Grav\Plugin\Admin $popularity
Résultat Grav\Plugin\Admin\Popularity

$route protected_oe property

protected string $route
Résultat string

$session protected_oe property

protected Session,RocketTheme\Toolbox\Session $session
Résultat RocketTheme\Toolbox\Session\Session

$template protected_oe property

protected string $template
Résultat string

$theme protected_oe property

protected string $theme
Résultat string

$uri protected_oe property

protected Uri,Grav\Common $uri
Résultat Grav\Common\Uri

$version protected_oe property

protected $version