public function initializeObject($initializationCause)
{
// FIXME: This is a workaround for after the resource management changes that introduced the property.
if ($this->variants === null) {
$this->variants = new ArrayCollection();
}
if ($initializationCause === ObjectManagerInterface::INITIALIZATIONCAUSE_CREATED) {
$this->calculateDimensionsFromResource($this->resource);
}
parent::initializeObject($initializationCause);
}