public function setUtmSourceTag()
    {
        if ($this->utmSource) {
            $utmTags = $this->getUtmTag();
            if ($originalUtmTags = $this->contact->getUtmTags()) {
                $utmTags = $originalUtmTags[0];
            } else {
                $utmTags->setLead($this->contact);
            }
            $utmTags->setUtmSource($this->utmSource);
            $utmTags->setDateAdded(new \DateTime());
            $this->em->persist($utmTags);
            if ($originalUtmTags) {
                $this->em->flush($utmTags);
            }
            $this->contact->setUtmTags($utmTags);
        }
    }
public function setUtmSourceTag()
    {
        if ($this->utmSource) {
            $utmTags = $this->getUtmTag();
            if ($originalUtmTags = $this->contact->getUtmTags()) {
                $utmTags = $originalUtmTags[0];
            } else {
                $utmTags->setLead($this->contact);
            }
            $utmTags->setUtmSource($this->utmSource);
            $utmTags->setDateAdded(new \DateTime());
            $this->em->persist($utmTags);
            if ($originalUtmTags) {
                $this->em->flush($utmTags);
            }
            $this->contact->setUtmTags($utmTags);
        }
    }
public function setUtmSourceTag ( ) { if ( $ this -> utmSource ) { $ utmTags = $ this -> getUtmTag ( ) ; if ( $ originalUtmTags = $ this -> contact -> getUtmTags ( ) ) { $ utmTags = $ originalUtmTags [ 0 ] ; } else { $ utmTags -> setLead ( $ this -> contact ) ; } $ utmTags -> setUtmSource ( $ this -> utmSource ) ; $ utmTags -> setDateAdded ( new \ DateTime ( ) ) ; $ this -> em -> persist ( $ utmTags ) ; if ( $ originalUtmTags ) { $ this -> em -> flush ( $ utmTags ) ; } $ this -> contact -> setUtmTags ( $ utmTags ) ; } }
Allow imports to set Utm Tags.

@throws \Doctrine\ORM\OptimisticLockException
Allow imports to set Utm Tags .