/**
* Sets the footprint image.
*
* @param FootprintImage $image The footprint image
*
* @return void
*/
public function setImage($image)
{
if ($image instanceof FootprintImage) {
$image->setFootprint($this);
$this->image = $image;
} else {
// Because this is a 1:1 relationship. only allow the temporary image to be set when no image exists.
// If an image exists, the frontend needs to deliver the old file ID with the replacement property set.
if ($this->getImage() === null) {
$this->image = $image;
}
}
}