I am extending
When I extend
This is what I have:
\XF\Admin\Controller\Forum
in my addon with a one-to-one relationship between a Item
entity and node. I have the relationship defined in both my custom entity as well as the node through nodeEntityStructure
in the listener.When I extend
saveTypeData()
in \XF\Admin\Controller\Forum
- I am having trouble figuring out how I can find the node ID so that I can save that in the Item entity table.This is what I have:
Code:
protected function saveTypeData(FormAction $form, \XF\Entity\Node $node, \XF\Entity\AbstractNode $data)
{
parent::saveTypeData($form, $node, $data);
$form->setup(function() use ($data, $node)
{
// process $this->filter here
});
// Shouldn't the node ID be available here?
if ($node->isInsert()) {
var_dump($node->node_id);
exit;
}