# Class e.p.p.p.PigmentFrontendExtensionMixin(Loggable):

Part of elisa.plugins.pigment.pigment_frontend View In Hierarchy

Known subclasses: elisa.plugins.pigment.pigment_frontend.PigmentFrontend, elisa.plugins.pigment.tests.test_pigment_frontend.PigmentFrontendExtensionMixinStub

No class docstring

Line # | Kind | Name | Docs
--- | --- | --- | ---
51 | Method | __init__ | Undocumented
84 | Method | add_controller | Add a new controller to the frontend. The controller is the one that
97 | Method | create_controller | Create a controller for the given path.
133 | Method | retrieve_controllers | Retrieve the list of controllers for a given path.
150 | Method | add_decorator | Add a decorator function for controllers matching path_pattern.

def __init__(self):
overrides elisa.core.log.Loggable.__init__
overridden in elisa.plugins.pigment.tests.test_pigment_frontend.PigmentFrontendExtensionMixinStub
Undocumented
def add_controller(self, path_pattern, controller):
overridden in elisa.plugins.pigment.tests.test_pigment_frontend.PigmentFrontendExtensionMixinStub
Add a new controller to the frontend. The controller is the one that will be loaded for paths matching `path_pattern`.

Parameters | path_pattern | regular expression pattern (type: `str` )
| controller | controller class or component path (type: `elisa.core.components.controller.Controller` or component path string of a controller class )

def create_controller(self, path, config=None, wait_for_decorators=False, **kwargs):
Create a controller for the given path.

Parameters | path | path (type: `str` )
| config | configuration to set for the controller (type: configobj section )
Returns | controller instance (type: `elisa.core.components.controller.Controller` )

def retrieve_controllers(self, path):

Retrieve the list of controllers for a given path.

The list will contain all the controllers created for the path which haven't been garbage collected.

Parameters | path | the controllers' path (type: string )
Returns | list of controllers for the given path (type: list of `elisa.plugins.pigment.PigmentController` )

def add_decorator(self, path_pattern, decorator):
overridden in elisa.plugins.pigment.tests.test_pigment_frontend.PigmentFrontendExtensionMixinStub

Add a decorator function for controllers matching path_pattern.

A controller decorator is a callable object that is called when a new controller is created. It can be used to alter the behaviour of a controller (say, the UI created by the controller). Controller decorators are called with a controller instance as their only argument and should return a deferred.

Parameters | path_pattern | path pattern (type: `str` )
| decorator | decorator callable or decorator path string (type: callable or `str` )