PartKeepr\StorageLocationBundle\Entity\StorageLocation::setCategory PHP Method

setCategory() public method

Sets the category for this storage location.
public setCategory ( StorageLocationCategory $category ) : void
$category StorageLocationCategory The category
return void
    public function setCategory(StorageLocationCategory $category)
    {
        $this->category = $category;
    }

Usage Example

Exemplo n.º 1
0
 public function load(ObjectManager $manager)
 {
     $storageLocation = new StorageLocation();
     $storageLocation->setName("test");
     $storageLocation->setCategory($this->getReference("storagelocationcategory.first"));
     $manager->persist($storageLocation);
     $manager->flush();
     $this->addReference("storagelocation.first", $storageLocation);
 }
All Usage Examples Of PartKeepr\StorageLocationBundle\Entity\StorageLocation::setCategory