PartKeepr\PartBundle\Entity\PartDistributor::setPart PHP Méthode

setPart() public méthode

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

Usage Example

Exemple #1
0
 /**
  * Removes a part distributor
  *
  * @param PartDistributor $partDistributor A part distributor to remove
  */
 public function removeDistributor(PartDistributor $partDistributor)
 {
     $partDistributor->setPart(null);
     $this->distributors->removeElement($partDistributor);
 }