[RSS Feed/News] Deleting a parent node with large amount of child nodes causes allowed memory size exception

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
PHP:

Code:
    protected function deleteChildren()
    {
        $finder = $this->entity->em()->getFinder($this->entity->structure()->shortName);
        $finder->where($this->config['parentField'], $this->entity->getEntityId());
        
        foreach ($finder->fetch() AS $child)
        {
            /** @var Entity $child */
            $treeStructure = $child->getBehavior('XF:TreeStructured');
            $treeStructure->setOption('deleteChildAction'...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom