PartKeepr\FootprintBundle\Entity\Footprint::setDescription PHP Method

setDescription() public method

Sets the description of this footprint.
public setDescription ( string $description ) : void
$description string The description
return void
    public function setDescription($description)
    {
        $this->description = $description;
    }

Usage Example

 protected function createFootprint($footprintName, $footprintData)
 {
     $fileService = $this->get("partkeepr_uploadedfile_service");
     $footprintCategoryService = $this->get("partkeepr.footprint.category_service");
     $footprintCategoryRootNode = $footprintCategoryService->getRootNode();
     $footprint = new Footprint();
     $footprint->setName($footprintName);
     if (array_key_exists("description", $footprintData)) {
         $footprint->setDescription($footprintData["description"]);
     }
     if (array_key_exists("category", $footprintData)) {
         $footprintCategory = $this->addFootprintCategoryPath(explode("/", $footprintData["category"]), $footprintCategoryRootNode);
         $footprint->setCategory($footprintCategory);
     }
     if (array_key_exists("image", $footprintData)) {
         $footprintImage = new FootprintImage();
         $file = $this->get("kernel")->locateResource(self::FOOTPRINT_PATH . $footprintData["image"]);
         $fileService->replaceFromFilesystem($footprintImage, new File($file));
         $footprint->setImage($footprintImage);
     }
     $this->get("doctrine.orm.default_entity_manager")->persist($footprint);
 }
All Usage Examples Of PartKeepr\FootprintBundle\Entity\Footprint::setDescription