当前位置: 首页>>代码示例>>PHP>>正文


PHP Operator::getAccountCodes方法代码示例

本文整理汇总了PHP中Operator::getAccountCodes方法的典型用法代码示例。如果您正苦于以下问题:PHP Operator::getAccountCodes方法的具体用法?PHP Operator::getAccountCodes怎么用?PHP Operator::getAccountCodes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Operator的用法示例。


在下文中一共展示了Operator::getAccountCodes方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: perms

 /**
  */
 public function perms()
 {
     $perms = array('accountcodes' => array('title' => _("Account Codes")));
     $accountcodes = Operator::getAccountCodes();
     foreach ($accountcodes as $accountcode) {
         $perms['accountcodes:' . $accountcode] = array('title' => $accountcode);
     }
     return $perms;
 }
开发者ID:jubinpatel,项目名称:horde,代码行数:11,代码来源:Application.php

示例2: _operator_perms

function _operator_perms()
{
    static $perms = array();
    if (!empty($perms)) {
        return $perms;
    }
    @define('OPERATOR_BASE', __DIR__ . '/..');
    require_once OPERATOR_BASE . '/lib/base.php';
    $perms['tree']['operator']['accountcodes'] = false;
    $perms['title']['operator:accountcodes'] = _("Account Codes");
    $accountcodes = Operator::getAccountCodes();
    foreach ($accountcodes as $accountcode) {
        $perms['tree']['operator']['accountcodes'][$accountcode] = false;
        $perms['title']['operator:accountcodes:' . $accountcode] = $accountcode;
    }
    return $perms;
}
开发者ID:raz0rsdge,项目名称:horde,代码行数:17,代码来源:api.php

示例3: __construct

 public function __construct($title, &$vars)
 {
     parent::__construct($vars, $title);
     // FIXME: Generate a list of clients from Turba?
     //$clients =
     $now = time();
     if (!$vars->exists('startdate')) {
         // Default to the beginning of the previous calendar month
         $startdate = array('day' => 1, 'month' => date('n', $now), 'year' => date('Y', $now), 'hour' => 0, 'minute' => 0, 'second' => 0);
         $vars->set('startdate', $startdate);
     }
     if (!$vars->exists('enddate')) {
         // Default to the end of the previous calendar month
         $month = date('n', $now);
         $year = date('Y', $now);
         $lastday = Horde_Date_Utils::daysInMonth($month, $year);
         $enddate = array('day' => $lastday, 'month' => $month, 'year' => $year, 'hour' => 23, 'minute' => 59, 'second' => 59);
         $vars->set('enddate', $enddate);
     }
     try {
         $accountcodes = Operator::getAccountCodes(true);
     } catch (Exception $e) {
         $GLOBALS['notification']->push($e);
         $accountcodes = array();
     }
     // Parameters for Horde_Form_datetime
     $start_year = date('Y', $now) - 5;
     $end_year = '';
     $picker = true;
     $format_in = null;
     $format_out = '%x';
     $show_seconds = true;
     $params = array($start_year, $end_year, $picker, $format_in, $format_out, $show_seconds);
     $this->addVariable(_("Account Code"), 'accountcode', 'enum', false, false, null, array($accountcodes));
     $this->addVariable(_("Destination Context"), 'dcontext', 'text', false, false, _("An empty destination context will match all destination contexts."));
     $this->addVariable(_("Start Date & Time"), 'startdate', 'datetime', true, false, null, $params);
     $this->addVariable(_("End Date & Time"), 'enddate', 'datetime', true, false, null, $params);
 }
开发者ID:jubinpatel,项目名称:horde,代码行数:38,代码来源:SearchCDR.php


注:本文中的Operator::getAccountCodes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。