本文整理匯總了PHP中Kronolith::listShareUsers方法的典型用法代碼示例。如果您正苦於以下問題:PHP Kronolith::listShareUsers方法的具體用法?PHP Kronolith::listShareUsers怎麽用?PHP Kronolith::listShareUsers使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Kronolith
的用法示例。
在下文中一共展示了Kronolith::listShareUsers方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: toHash
/**
* Returns a hash representing this calendar.
*
* @return array A simple hash.
*/
public function toHash()
{
global $calendar_manager, $conf, $injector, $registry;
$owner = $registry->getAuth() && $this->_share->get('owner') == $registry->getAuth();
$hash = parent::toHash();
$hash['name'] = Kronolith::getLabel($this->_share);
$hash['desc'] = (string) $this->_share->get('desc');
$hash['owner'] = $owner;
$hash['users'] = Kronolith::listShareUsers($this->_share);
$hash['fg'] = Kronolith::foregroundColor($this->_share);
$hash['bg'] = Kronolith::backgroundColor($this->_share);
$hash['show'] = in_array('tasks/' . $this->_share->getName(), $calendar_manager->get(Kronolith::DISPLAY_EXTERNAL_CALENDARS));
$hash['edit'] = $this->_share->hasPermission($registry->getAuth(), Horde_Perms::EDIT);
$hash['caldav'] = $this->caldavUrl();
$hash['sub'] = Horde::url($registry->get('webroot', 'horde') . ($conf['urls']['pretty'] == 'rewrite' ? '/rpc/nag/' : '/rpc.php/nag/'), true, -1) . ($this->_share->get('owner') ? $registry->convertUsername($this->_share->get('owner'), false) : '-system-') . '/' . $this->_share->getName() . '.ics';
if ($owner) {
$hash['perms'] = Kronolith::permissionToJson($this->_share->getPermission(), is_null($this->_share->get('owner')));
}
return $hash;
}
示例2: toHash
/**
* Returns a hash representing this calendar.
*
* @return array A simple hash.
*/
public function toHash()
{
global $calendar_manager, $conf, $injector, $registry;
$id = $this->_share->getName();
$owner = $registry->getAuth() && $this->owner() == $registry->getAuth();
$hash = parent::toHash();
$hash['name'] = $this->name();
$hash['owner'] = $owner;
$hash['users'] = Kronolith::listShareUsers($this->_share);
$hash['show'] = in_array($id, $calendar_manager->get(Kronolith::DISPLAY_CALENDARS));
$hash['edit'] = $this->hasPermission(Horde_Perms::EDIT);
try {
$hash['caldav'] = Horde::url($registry->get('webroot', 'horde') . ($conf['urls']['pretty'] == 'rewrite' ? '/rpc/calendars/' : '/rpc.php/calendars/'), true, -1) . $registry->getAuth() . '/' . $injector->getInstance('Horde_Dav_Storage')->getExternalCollectionId($id, 'calendar') . '/';
} catch (Horde_Exception $e) {
}
$hash['sub'] = Horde::url($registry->get('webroot', 'horde') . ($conf['urls']['pretty'] == 'rewrite' ? '/rpc/kronolith/' : '/rpc.php/kronolith/'), true, -1) . ($this->owner() ? $this->owner() : '-system-') . '/' . $id . '.ics';
$hash['feed'] = (string) Kronolith::feedUrl($id);
$hash['embed'] = Kronolith::embedCode($id);
$hash['tg'] = array_values(Kronolith::getTagger()->getTags($id, Kronolith_Tagger::TYPE_CALENDAR));
if ($owner) {
$hash['perms'] = Kronolith::permissionToJson($this->_share->getPermission());
}
return $hash;
}
示例3: toHash
/**
* Returns a hash representing this calendar.
*
* @return array A simple hash.
*/
public function toHash()
{
global $calendar_manager, $conf, $injector, $registry;
$id = $this->_share->getName();
$owner = $registry->getAuth() && ($this->owner() == $registry->getAuth() || $this->isSystem() && $registry->isAdmin());
$hash = parent::toHash();
$hash['name'] = $this->name();
$hash['owner'] = $owner;
$hash['system'] = $this->isSystem();
$hash['users'] = Kronolith::listShareUsers($this->_share);
$hash['show'] = in_array($id, $calendar_manager->get(Kronolith::DISPLAY_CALENDARS));
$hash['edit'] = $this->hasPermission(Horde_Perms::EDIT);
$hash['delete'] = $this->hasPermission(Horde_Perms::DELETE);
$hash['caldav'] = $this->caldavUrl();
$hash['sub'] = Horde::url($registry->get('webroot', 'horde') . ($conf['urls']['pretty'] == 'rewrite' ? '/rpc/kronolith/' : '/rpc.php/kronolith/'), true, -1) . ($this->owner() ? $registry->convertUsername($this->owner(), false) : '-system-') . '/' . $id . '.ics';
$hash['feed'] = (string) Kronolith::feedUrl($id);
$hash['embed'] = Kronolith::embedCode($id);
$hash['tg'] = array_values(Kronolith::getTagger()->getTags($id, Kronolith_Tagger::TYPE_CALENDAR));
if ($owner) {
$hash['perms'] = Kronolith::permissionToJson($this->_share->getPermission(), is_null($this->_share->get('owner')));
}
return $hash;
}