private function getPageFromEvent(ResourceEventInterface $event)
    {
        $resource = $event->getResource();

        if (!$resource instanceof PageInterface) {
            throw new InvalidArgumentException("Expected instance of PageInterface");
        }

        return $resource;
    }
private function getPageFromEvent(ResourceEventInterface $event)
    {
        $resource = $event->getResource();

        if (!$resource instanceof PageInterface) {
            throw new InvalidArgumentException("Expected instance of PageInterface");
        }

        return $resource;
    }
private function getPageFromEvent ( ResourceEventInterface $ event ) { $ resource = $ event -> getResource ( ) ; if ( ! $ resource instanceof PageInterface ) { throw new InvalidArgumentException ( "Expected instance of PageInterface" ) ; } return $ resource ; }
Returns the page from the event.

@param ResourceEventInterface $event

@return PageInterface
Returns the page from the event .