-
Notifications
You must be signed in to change notification settings - Fork 0
Extensions
Alex Torscho edited this page Feb 4, 2015
·
3 revisions
An Extension is a separate package that integrates well to The Backend.
In order to connect an extension to The Backend, simply inherit the Extension class located in vendor/atorscho/backend/src/Atorscho/Backend/Extensions.
Next fill the properties with relevant information.
An example:
class MessengerExtension extends Atorscho\Backend\Extensions\Extension {
protected $enabled = true;
protected $name = 'Messenger';
protected $service = 'Vendor\Package\MessengerServiceProvider';
protected $uri = 'messenger';
protected $route = 'messenger.index';
protected $icon = 'envelope';
protected $settings = 'messenger';
}This will automatically add your extension to the $extensions variable available in all views.
You can also add settings specific to your extension with the method described here.
Note!
If the extension is disabled (protected $enabled = false) or the extension service provider has not been found, the extension is considered as nonexistent.
The tutorial about how to properly create an extension will be written soon!