Sulu\Bundle\MediaBundle\Api\Media::getId PHP Method

getId() public method

public getId ( ) : integer
return integer
    public function getId()
    {
        return $this->entity->getId();
    }

Usage Example

Example #1
0
 /**
  * Get the contacts avatar and return the array of different formats.
  *
  * @return Media
  *
  * @VirtualProperty
  * @SerializedName("avatar")
  * @Groups({"fullContact","partialContact"})
  */
 public function getAvatar()
 {
     if ($this->avatar) {
         return ['id' => $this->avatar->getId(), 'url' => $this->avatar->getUrl(), 'thumbnails' => $this->avatar->getFormats()];
     }
     return;
 }
All Usage Examples Of Sulu\Bundle\MediaBundle\Api\Media::getId