當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Kronolith::getAddressbookSearchParams方法代碼示例

本文整理匯總了PHP中Kronolith::getAddressbookSearchParams方法的典型用法代碼示例。如果您正苦於以下問題:PHP Kronolith::getAddressbookSearchParams方法的具體用法?PHP Kronolith::getAddressbookSearchParams怎麽用?PHP Kronolith::getAddressbookSearchParams使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Kronolith的用法示例。


在下文中一共展示了Kronolith::getAddressbookSearchParams方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _getAddressbookSearchParams

 /**
  */
 protected function _getAddressbookSearchParams()
 {
     $params = Kronolith::getAddressbookSearchParams();
     $ob = new stdClass();
     $ob->fields = $params['fields'];
     $ob->sources = $params['sources'];
     return $ob;
 }
開發者ID:jubinpatel,項目名稱:horde,代碼行數:10,代碼來源:ContactAutoCompleter.php

示例2: key

    exit;
}
/* Get the lists of address books through API */
$source_list = $registry->call('contacts/sources');
/* If we self-submitted, use that source. Otherwise, choose a good
 * source. */
$source = Horde_Util::getFormData('source');
if (empty($source) || !isset($source_list[$source])) {
    /* We don't just pass the second argument to getFormData() because
     * we want to trap for invalid sources, not just no source. */
    $source = key($source_list);
}
/* Get the search as submitted (defaults to '' which should list everyone). */
$search = Horde_Util::getFormData('search');
if ($search || $prefs->getValue('display_contact')) {
    $searchpref = Kronolith::getAddressbookSearchParams();
    $fields = isset($searchpref[$source]) ? array($source => $searchpref[$source]) : array();
    try {
        $results = $registry->call('contacts/search', array($search, array('fields' => $fields, 'sources' => array($source))));
    } catch (Exception $e) {
        $results = array();
    }
} else {
    $results = array();
}
/* The results list returns an array for each source searched - at least
   that's how it looks to me. Make it all one array instead. */
$addresses = array();
foreach ($results as $r) {
    $addresses = array_merge($addresses, $r);
}
開發者ID:DSNS-LAB,項目名稱:Dmail,代碼行數:31,代碼來源:contacts.php

示例3: display

 /**
  */
 public function display(Horde_Core_Prefs_Ui $ui)
 {
     Horde_Core_Prefs_Ui_Widgets::addressbooksInit();
     $search = Kronolith::getAddressbookSearchParams();
     return Horde_Core_Prefs_Ui_Widgets::addressbooks(array('fields' => $search['fields'], 'sources' => $search['sources']));
 }
開發者ID:jubinpatel,項目名稱:horde,代碼行數:8,代碼來源:Sourceselect.php


注:本文中的Kronolith::getAddressbookSearchParams方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。