$resource =
new $class();
} $resource->
setManager($this->
getManager());
if ($this->
getAcl() !== null
) { $resource->
setAcl($this->
getAcl());
} if ($this->
getRole() !== null
) { $resource->
setRole($this->
getRole());
} return $resource;
} /**
* Helper function which checks the option configuration for the passed collection.
*
* If the data property contains the "__options_$optionName" value and this value contains
* the "replace" parameter, the collection will be cleared.
*
* @template TEntity of ModelEntity
*
* @param ArrayCollection<array-key, TEntity> $collection
* @param array<array-key, array<string, mixed>> $data
* @param string $optionName
* @param bool $defaultReplace
*
* @return ArrayCollection<array-key, TEntity>
*/