src/Listener/RelatedModelsListener.php
public function beforeRender(Event $event)
    {
        $entity = null;
        if (isset($event->getSubject()->entity)) {
            $entity = $event->getSubject()->entity;
        }
        $this->publishRelatedModels(null, $entity);
    }
public function beforeRender(Event $event)
    {
        $entity = null;
        if (isset($event->getSubject()->entity)) {
            $entity = $event->getSubject()->entity;
        }
        $this->publishRelatedModels(null, $entity);
    }
public function beforeRender ( Event $ event ) { $ entity = null ; if ( isset ( $ event -> getSubject ( ) -> entity ) ) { $ entity = $ event -> getSubject ( ) -> entity ; } $ this -> publishRelatedModels ( null , $ entity ) ; }
Fetches related models' list and sets them to a variable for the view

@param Event $event Event
@return void
@codeCoverageIgnore
Fetches related models list and sets them to a variable for the view