if (empty($updateIds)) { return;
} /** @var TreePathField $pathField */
$pathField =
$definition->
getFields()->
filterInstance(TreePathField::
class)->
first();
/** @var TreeLevelField $levelField */
$levelField =
$definition->
getFields()->
filterInstance(TreeLevelField::
class)->
first();
foreach ($updateIds as $updateId) { $entity =
$this->
updatePath($updateId,
$bag);
if ($entity !== null
) { $this->
updateEntity($entity,
$definition,
$pathField,
$levelField,
$context,
$bag);
} } $childIds =
$this->
fetchByColumn($updateIds,
$definition, 'parent_id',
$context,
$bag);
$this->
updateLevelRecursively($childIds,
$definition,
$context,
$bag);
} private function updateEntity(array
$entity, EntityDefinition
$definition, ?TreePathField
$pathField, ?TreeLevelField
$levelField, Context
$context, TreeUpdaterBag
$bag): void
{