public function toArray() { $data = parent::toArray(); foreach ($this->_comma_separated->toArray() as $column) { $data[$column] = $this->{$column}; } return $data; }
/** * Return an associative array of the data. * * @return array */ public function toArray() { $data = parent::toArray(); //Include the manifest fields foreach (self::$_manifest_fields as $field) { $data[$field] = (string) $this->{$field}; } $data['name'] = (string) $this->name; $data['title'] = (string) $this->title; unset($data['path']); return $data; }
public function toArray() { $data = parent::toArray(); unset($data['file']); unset($data['container']); unset($data['_token']); unset($data['option']); unset($data['format']); unset($data['basepath']); $data['type'] = $this->isImage() ? 'image' : 'file'; $data['name'] = $this->name; $data['extension'] = $this->extension; $data['size'] = $this->size; $data['icons'] = $this->icons; if ($this->isImage() == 'image') { $data['thumbnail'] = $this->thumbnail; $data['width'] = $this->width; $data['height'] = $this->height; } return $data; }
public function toArray() { $data = parent::toArray(); unset($data['basepath']); $data['type'] = 'folder'; $data['name'] = $this->name; if ($this->hasChildren()) { $data['children'] = $this->getChildren()->toArray(); } return $data; }
public function toArray() { $data = parent::toArray(); unset($data['basepath']); $data['type'] = 'folder'; $data['name'] = $this->name; return $data; }
public function toArray() { $data = parent::toArray(); unset($data['_token']); unset($data['action']); unset($data['option']); unset($data['format']); unset($data['view']); $data['container'] = $this->container->slug; $data['type'] = $this->getIdentifier()->name; return $data; }