示例#1
0
 /**
  * Get an associative array of this object
  * @since Version 3.10.0
  * @return array
  */
 public function getArray()
 {
     $data = ["id" => $this->id, "name" => $this->name, "description" => $this->desc, "url_file" => $this->url_file, "filename" => $this->filename, "filepath" => $this->filepath, "filesize" => $this->filesize, "mime" => $this->mime, "active" => $this->active, "approved" => $this->approved, "meta" => $this->extra_data, "date" => $this->Date, "author" => $this->Author->getArray(), "url" => $this->url->getURLs(), "thumbnail" => $this->getThumbnail(), "icon" => $this->getIcon()];
     return $data;
 }
示例#2
0
 /**
  * Get an array of data
  * @since Version 3.9.1
  * @return array
  */
 public function getArray()
 {
     return array("id" => $this->id, "name" => $this->name, "description" => $this->description, "namespace" => $this->namespace, "created" => array("absolute" => $this->DateCreated->format("Y-m-d H:i:s"), "relative" => ContentUtility::relativeTime($this->DateCreated)), "modified" => array("absolute" => $this->DateModified->format("Y-m-d H:i:s"), "relative" => ContentUtility::relativeTime($this->DateModified)), "url" => $this->url->getURLs(), "owner" => $this->Author->getArray());
 }