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

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

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

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

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

@param ResourceEventInterface $event

@return MenuInterface
Returns the menu from the event .