src/Event/RouteListener.php
public function decoratePublishedQuery(Event $event)
    {
        $query = $event->subject();
        
        // Join the PagesTable
        $query
            ->select(['Pages.id'])
            ->join([
                'Pages' => [
                    'table' => 'cms_pages',
                    'type' => 'LEFT',
                    'conditions' => [
                        'MenuItems.foreign_model = "Wasabi/Cms.Pages"',
                        'MenuItems.foreign_id = Pages.id',
                        'Pages.status' => Page::STATUS_PUBLISHED
                    ]
                ]
            ]);
    }
public function decoratePublishedQuery(Event $event)
    {
        $query = $event->subject();
        
        // Join the PagesTable
        $query
            ->select(['Pages.id'])
            ->join([
                'Pages' => [
                    'table' => 'cms_pages',
                    'type' => 'LEFT',
                    'conditions' => [
                        'MenuItems.foreign_model = "Wasabi/Cms.Pages"',
                        'MenuItems.foreign_id = Pages.id',
                        'Pages.status' => Page::STATUS_PUBLISHED
                    ]
                ]
            ]);
    }
public function decoratePublishedQuery ( Event $ event ) { $ query = $ event -> subject ( ) ; // Join the PagesTable $ query -> select ( [ 'Pages.id' ] ) -> join ( [ 'Pages' => [ 'table' => 'cms_pages' , 'type' => 'LEFT' , 'conditions' => [ 'MenuItems.foreign_model = "Wasabi/Cms.Pages"' , 'MenuItems.foreign_id = Pages.id' , 'Pages.status' => Page :: STATUS_PUBLISHED ] ] ] ) ; }
Decorate the given query by joining the PagesTable.

@param Event $event
@return void
Decorate the given query by joining the PagesTable .