first commi
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Grav\Events
|
||||
*
|
||||
* @copyright Copyright (c) 2015 - 2021 Trilby Media, LLC. All rights reserved.
|
||||
* @license MIT License; see LICENSE file for details.
|
||||
*/
|
||||
|
||||
namespace Grav\Events;
|
||||
|
||||
use Grav\Framework\Flex\Flex;
|
||||
use Symfony\Contracts\EventDispatcher\Event;
|
||||
|
||||
/**
|
||||
* Flex Register Event
|
||||
*
|
||||
* This event is called the first time $grav['flex'] is being called.
|
||||
*
|
||||
* Use this event to register enabled Directories to Flex.
|
||||
*
|
||||
* @property Flex $flex Flex instance.
|
||||
*/
|
||||
class FlexRegisterEvent extends Event
|
||||
{
|
||||
/** @var Flex */
|
||||
public $flex;
|
||||
|
||||
/**
|
||||
* FlexRegisterEvent constructor.
|
||||
* @param Flex $flex
|
||||
*/
|
||||
public function __construct(Flex $flex)
|
||||
{
|
||||
$this->flex = $flex;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function __debugInfo(): array
|
||||
{
|
||||
return (array)$this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Grav\Events
|
||||
*
|
||||
* @copyright Copyright (c) 2015 - 2021 Trilby Media, LLC. All rights reserved.
|
||||
* @license MIT License; see LICENSE file for details.
|
||||
*/
|
||||
|
||||
namespace Grav\Events;
|
||||
|
||||
use Grav\Framework\Acl\Permissions;
|
||||
use Symfony\Contracts\EventDispatcher\Event;
|
||||
|
||||
/**
|
||||
* Permissions Register Event
|
||||
*
|
||||
* This event is called the first time $grav['permissions'] is being called.
|
||||
*
|
||||
* Use this event to register any new permission types you use in your plugins.
|
||||
*
|
||||
* @property Permissions $permissions Permissions instance.
|
||||
*/
|
||||
class PermissionsRegisterEvent extends Event
|
||||
{
|
||||
/** @var Permissions */
|
||||
public $permissions;
|
||||
|
||||
/**
|
||||
* PermissionsRegisterEvent constructor.
|
||||
* @param Permissions $permissions
|
||||
*/
|
||||
public function __construct(Permissions $permissions)
|
||||
{
|
||||
$this->permissions = $permissions;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function __debugInfo(): array
|
||||
{
|
||||
return (array)$this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Grav\Events
|
||||
*
|
||||
* @copyright Copyright (c) 2015 - 2021 Trilby Media, LLC. All rights reserved.
|
||||
* @license MIT License; see LICENSE file for details.
|
||||
*/
|
||||
|
||||
namespace Grav\Events;
|
||||
|
||||
use Grav\Common\Grav;
|
||||
use Grav\Common\Plugins;
|
||||
use Symfony\Contracts\EventDispatcher\Event;
|
||||
|
||||
/**
|
||||
* Plugins Loaded Event
|
||||
*
|
||||
* This event is called from InitializeProcessor.
|
||||
*
|
||||
* This is the first event plugin can see. Please avoid using this event if possible.
|
||||
*
|
||||
* @property Grav $grav Grav container.
|
||||
* @property Plugins $plugins Plugins instance.
|
||||
*/
|
||||
class PluginsLoadedEvent extends Event
|
||||
{
|
||||
/** @var Grav */
|
||||
public $grav;
|
||||
/** @var Plugins */
|
||||
public $plugins;
|
||||
|
||||
/**
|
||||
* PluginsLoadedEvent constructor.
|
||||
* @param Grav $grav
|
||||
* @param Plugins $plugins
|
||||
*/
|
||||
public function __construct(Grav $grav, Plugins $plugins)
|
||||
{
|
||||
$this->grav = $grav;
|
||||
$this->plugins = $plugins;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function __debugInfo(): array
|
||||
{
|
||||
return [
|
||||
'plugins' => $this->plugins
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Grav\Events
|
||||
*
|
||||
* @copyright Copyright (c) 2015 - 2021 Trilby Media, LLC. All rights reserved.
|
||||
* @license MIT License; see LICENSE file for details.
|
||||
*/
|
||||
|
||||
namespace Grav\Events;
|
||||
|
||||
use Grav\Framework\Session\SessionInterface;
|
||||
use Symfony\Contracts\EventDispatcher\Event;
|
||||
|
||||
/**
|
||||
* Plugins Loaded Event
|
||||
*
|
||||
* This event is called from $grav['session']->start() right after successful session_start() call.
|
||||
*
|
||||
* @property SessionInterface $session Session instance.
|
||||
*/
|
||||
class SessionStartEvent extends Event
|
||||
{
|
||||
/** @var SessionInterface */
|
||||
public $session;
|
||||
|
||||
public function __construct(SessionInterface $session)
|
||||
{
|
||||
$this->session = $session;
|
||||
}
|
||||
|
||||
public function __debugInfo(): array
|
||||
{
|
||||
return (array)$this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user