public function toHash() { return array('name' => $this->name(), 'desc' => $this->description(), 'owner' => true, 'users' => array(), 'fg' => $this->foreground(), 'bg' => $this->background()); }
/** * Returns a hash representing this calendar. * * @return array A simple hash. */ public function toHash() { $owner = $GLOBALS['registry']->isAdmin() || $GLOBALS['injector']->getInstance('Horde_Core_Perms')->hasAppPermission('resource_management'); $hash = parent::toHash(); $hash['id'] = $this->_resource->getId(); $hash['name'] = $this->name(); $hash['owner'] = $owner; $hash['show'] = $this->display(); $hash['edit'] = $this->hasPermission(Horde_Perms::EDIT); $hash['sub'] = null; $hash['feed'] = null; $hash['embed'] = null; $hash['response_type'] = $this->_resource->get('response_type'); if ($owner) { $hash['perms'] = Kronolith::permissionToJson($this->_resource->getPermission()); } return $hash; }