public function onInitialize(ResourceEventInterface $event)
    {
        $page = $this->getPageFromEvent($event);

        $parent = $page->getParent();
        if ($parent && $parent->isLocked()) {
            throw new RuntimeException("Cannot create child page under a locked parent page.");
        }
    }