PartKeepr\PartBundle\Entity\PartAttachment::setPart PHP Method

setPart() public method

Sets the part.
public setPart ( Part $part = null )
$part Part The part to set
    public function setPart(Part $part = null)
    {
        $this->part = $part;
    }

Usage Example

Example #1
0
 /**
  * Removes a Part Attachment
  *
  * @param PartAttachment $partAttachment An attachment to remove
  */
 public function removeAttachment($partAttachment)
 {
     $partAttachment->setPart(null);
     $this->attachments->removeElement($partAttachment);
 }