Sulu\Bundle\ContactBundle\Entity\AccountInterface::getUrls PHP Method

getUrls() public method

Get urls.
public getUrls ( ) : Doctrine\Common\Collections\Collection
return Doctrine\Common\Collections\Collection
    public function getUrls();

Usage Example

Example #1
0
 /**
  * sets Entity's Main-Url.
  *
  * @param Contact|AccountInterface $entity
  */
 public function setMainUrl($entity)
 {
     // set main to first entry or to null
     if ($entity->getUrls()->isEmpty()) {
         $entity->setMainUrl(null);
     } else {
         $entity->setMainUrl($entity->getUrls()->first()->getUrl());
     }
 }