public function toArray() { $data = parent::toArray(); $data['hierarchy_title'] = $this->hierarchy_title; return $data; }
public function toArray() { $data = parent::toArray(); unset($data['_thumbnail_size']); unset($data['source']); return $data; }
public function toArray() { $data = parent::toArray(); $data['relative_path'] = $this->getProperty('relative_path'); $data['parameters'] = $this->getParameters()->toArray(); return $data; }
public function toArray() { $data = parent::toArray(); $data['relative_path'] = $this->getProperty('relative_path'); $data['parameters'] = $this->getParameters()->toArray(); $data['server_upload_limit'] = static::getServerUploadLimit(); return $data; }
/** * @param string $name * @param mixed $value * @param bool $modified * @return $this */ public function setProperty($name, $value, $modified = true) { parent::setProperty($name, $value, $modified = true); if ($name === 'all_day') { $this->allDay = (bool) $this->{$name}; $this->color = '#ff00ff'; } return $this; }
public function save() { $conditions = $this->getConditions()->toArray(); $conditions = $this->array_filter_recursive($conditions); array_walk_recursive($conditions, function (&$value) { if (is_numeric($value)) { $value = (int) $value; } }); $this->getConditions()->merge($conditions); return parent::save(); }
public function toArray() { $data = parent::toArray(); $file = $this->file; if (!$file->isNew()) { $data['file'] = $file->toArray(); if ($file->isThumbnail()) { $thumbnail = $file->getThumbnail(); $data['thumbnail'] = !$thumbnail->isNew() ? $thumbnail->thumbnail : false; } $data['file'] = $file->toArray(); } $data['created_on_timestamp'] = strtotime($this->created_on); $data['attached_on_timestamp'] = strtotime($this->attached_on); return $data; }
public function toArray() { $data = parent::toArray(); $data['group_list'] = $this->getGroups(); return $data; }
protected function _initialize(KObjectConfig $config) { $config->append(array('auto_load' => true)); parent::_initialize($config); }
/** * Prevent removing the package property. * * @param string $name The property name. * * @throws RuntimeException When attempting to remove the package property. * @return KDatabaseRowAbstract */ public function removeProperty($name) { if ($name == 'package') { throw new RuntimeException('Entity package property cannot be removed.'); } return parent::removeProperty($name); }
/** * Excludes private fields from JSON representation * * @return array */ public function toArray() { $data = parent::toArray(); $data = array_intersect_key($data, $this->_fields); return $data; }
public function __construct(KObjectConfig $config) { parent::__construct($config); $this->details = array(); }
public function delete() { $this->_setCoreExtension(false); $client_id = $this->type == 'component' ? 1 : 0; $result = $this->getInstaller()->uninstall($this->type, $this->joomla_extension_id, $client_id); if ($result) { $result = parent::delete(); } if ($result) { // Uninstall dependencies (if they are dependent to this extension only) foreach ($this->getDependents() as $dependency) { $count = $this->getObject('com://admin/extman.model.dependencies')->dependent_id($dependency->dependent_id)->count(); if ($count === 1) { $extension = $this->getObject('com://admin/extman.model.extensions')->id($dependency->dependent_id)->fetch(); $extension->delete(); } $dependency->delete(); } } return $result; }
public function getProperty($name) { if ($name === 'alias') { return isset($this->_data['alias']) ? $this->_data['alias'] : $this->id . '-' . $this->slug; } return parent::getProperty($name); }