getSyncLists() public static method

Returns the tasklists that should be used for syncing.
public static getSyncLists ( ) : array
return array An array of task list ids
示例#1
0
文件: Api.php 项目: Gomez/horde
 /**
  * Returns a list of available sources.
  *
  * @param boolean $writeable  If true, limits to writeable sources.
  * @param boolean $sync_only  Only include synchable address books.
  *
  * @return array  An array of the available sources. Keys are source IDs,
  *                values are source titles.
  * @since 4.2.0
  */
 public function sources($writeable = false, $sync_only = false)
 {
     $out = array();
     foreach (Nag::listTasklists(false, $writeable ? Horde_Perms::EDIT : Horde_Perms::READ, false) as $key => $val) {
         $out[$key] = $val->get('name');
     }
     if ($sync_only) {
         $syncable = Nag::getSyncLists();
         $out = array_intersect_key($out, array_flip($syncable));
     }
     return $out;
 }