private function getResourceNode(FormInterface $form)
    {
        if ($form->getData() instanceof ResourceNode) {
            return $form->getData();
        } else if ($form->getData() and $form->getData() != '') {
            return $this->resourceManager->getById($form->getData());
        }
    }