Beispiel #1
0
 public function toArray()
 {
     $array = parent::toArray();
     if (empty($this->visible) || in_array('converted_amount', $this->visible)) {
         $array['converted_amount'] = $this->convertedAmount();
     }
     return $array;
 }
Beispiel #2
0
 /**
  * @return array
  */
 public function toArray()
 {
     $array = parent::toArray();
     if (empty($this->visible) || in_array('url', $this->visible)) {
         $array['url'] = $this->getUrl();
     }
     if (empty($this->visible) || in_array('preview_url', $this->visible)) {
         $array['preview_url'] = $this->getPreviewUrl();
     }
     return $array;
 }