setFootprint() public method

Sets the footprint.
public setFootprint ( Footprint $footprint )
$footprint Footprint The footprint to set
Beispiel #1
0
 /**
  * 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;
         }
     }
 }