PHP Класс ZF\Apigility\Admin\Listener\InjectModuleResourceLinksListener

Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( Interop\Container\ContainerInterface $viewHelpers )
__invoke ( MvcEvent $e ) : void Listen and respond to a render event.
onHalRenderEvents ( Zend\EventManager\EventInterface $e ) Normalize the route match controller service name.
onRenderCollectionEntity ( Zend\EventManager\EventInterface $e ) : void Inject links into collections
onRenderEntity ( Zend\EventManager\EventInterface $e ) : void Inject service entities with expected relational links.

Приватные методы

Метод Описание
getServiceType ( string $service ) : string
initializeUrlHelper ( ) : void Initializes the URL view helper to use when injecting links.
injectLinksByType ( string $type, ZF\Hal\Link\LinkCollection $links, null | string $module = null ) : void Inject service links
injectModuleCollectionRelationalLinks ( ModuleEntity $resource, Zend\EventManager\EventInterface $e ) : void Inject relational links into a Module resource
injectModuleResourceRelationalLinks ( ModuleEntity $module, $links, ZF\Hal\View\HalJsonModel $model ) : void
injectServiceCollectionRelationalLinks ( RestServiceEntity | RpcServiceEntity $entity, Zend\EventManager\EventInterface $e ) : void
injectServiceLinks ( ZF\Hal\Entity $halEntity, ZF\Hal\View\HalJsonModel $model, Zend\EventManager\EventInterface $e ) : void Inject links for the service services of a module
normalizeEntityControllerServiceName ( $entity, $links, ZF\Hal\View\HalJsonModel $model ) : void
normalizeEntityInputFilterName ( ZF\Apigility\Admin\Model\InputFilterEntity $entity, $links, ZF\Hal\View\HalJsonModel $model ) : void
normalizeInputFilterEntityName ( ArrayObject $entity, Zend\EventManager\EventInterface $e ) : void

Описание методов

__construct() публичный Метод

public __construct ( Interop\Container\ContainerInterface $viewHelpers )
$viewHelpers Interop\Container\ContainerInterface

__invoke() публичный Метод

Does the following: - Initializes a custom url helper for internal use - attaches its "onHalRenderEvents" listener to the HAL plugin's renderCollection, renderEntity, and renderCollection.entity events. - If the MvcEvent result's HalJsonModel composes an entity, injects service links into it, and attaches its "onRenderEntity" listener to the HAL plugin's renderEntity event. - If the MvcEvent result's HalJsonModel composes a collection, memoizes the MvcEvent route match, and attaches its "onRenderCollectionEntity" listener to the HAL plugin's renderCollection.entity event.
public __invoke ( MvcEvent $e ) : void
$e Zend\Mvc\MvcEvent
Результат void

onHalRenderEvents() публичный Метод

On each HAL plugin render event, if we have a route match containing a controller service name, normalize it.
public onHalRenderEvents ( Zend\EventManager\EventInterface $e )
$e Zend\EventManager\EventInterface return void

onRenderCollectionEntity() публичный Метод

Currently: - Inject RPC/REST service links inside module resources that are composed in collections
public onRenderCollectionEntity ( Zend\EventManager\EventInterface $e ) : void
$e Zend\EventManager\EventInterface
Результат void

onRenderEntity() публичный Метод

Inject service entities with expected relational links.
public onRenderEntity ( Zend\EventManager\EventInterface $e ) : void
$e Zend\EventManager\EventInterface
Результат void