/** * Insert new entity * * @param \XLite\Model\AEntity $entity Entity * * @return void */ protected function insertNewEntity(\XLite\Model\AEntity $entity) { // Resort $pos = 10; $entity->setPos($pos); foreach ($entity->getParent()->getChildren() as $child) { $pos += 10; $child->setPos($pos); } $this->createCount++; parent::insertNewEntity($entity); }