public function onPagePublicUrl(ResourceEventInterface $event)
    {
        $resource = $event->getResource();

        if (!$resource instanceof PageInterface) {
            return;
        }

        $event->stopPropagation();

        if (!$resource->isEnabled() || $resource->isDynamicPath()) {
            return;
        }

        $event->addData('route', $resource->getRoute());
    }
public function onPagePublicUrl(ResourceEventInterface $event)
    {
        $resource = $event->getResource();

        if (!$resource instanceof PageInterface) {
            return;
        }

        $event->stopPropagation();

        if (!$resource->isEnabled() || $resource->isDynamicPath()) {
            return;
        }

        $event->addData('route', $resource->getRoute());
    }
public function onPagePublicUrl ( ResourceEventInterface $ event ) { $ resource = $ event -> getResource ( ) ; if ( ! $ resource instanceof PageInterface ) { return ; } $ event -> stopPropagation ( ) ; if ( ! $ resource -> isEnabled ( ) || $ resource -> isDynamicPath ( ) ) { return ; } $ event -> addData ( 'route' , $ resource -> getRoute ( ) ) ; }
Page public url event handler.

@param ResourceEventInterface $event
Page public url event handler .