当前位置: 首页>>代码示例>>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;未经允许,请勿转载。