getFormats() public method

public getFormats ( ) : array
return array
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;
 }
Example #2
0
 /**
  * Get the accounts logo and return the array of different formats.
  *
  * @return Media
  *
  * @VirtualProperty
  * @SerializedName("logo")
  * @Groups({"fullAccount"})
  */
 public function getLogo()
 {
     if ($this->logo) {
         return ['id' => $this->logo->getId(), 'url' => $this->logo->getUrl(), 'thumbnails' => $this->logo->getFormats()];
     }
     return;
 }