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


PHP FreePBX::Customappsreg方法代码示例

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


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

示例1: customappsreg_getdestinfo

/** If this is ours, we return it, otherwise we return false
 *  We use just use customappsreg and not the display because it
 *  is a per-module routine
 */
function customappsreg_getdestinfo($dest)
{
    global $active_modules;
    $allDests = \FreePBX::Customappsreg()->getAllCustomDests();
    // Look for $dest in allDests. If we know about it, then return
    // the details. If we don't, return false.
    // Is it a new one?
    if (substr($dest, 0, 12) == "customdests,") {
        if (!preg_match("/customdests,dest-(\\d+),1/", $dest, $matches)) {
            throw new \Exception("Unable to validate dest {$dest}");
        }
        if (!isset($allDests[$matches[1]])) {
            return false;
        } else {
            // Found it.
            $cd = $allDests[$matches[1]];
            $tmparr = array('description' => sprintf(_("Custom Destination: %s"), $cd['description']), 'edit_url' => "config.php?display=customdests&destid=" . $cd['destid']);
            return $tmparr;
        }
    }
    foreach ($allDests as $cd) {
        if ($cd['target'] == $dest) {
            // Found it.
            $tmparr = array('description' => sprintf(_("Custom Destination: %s"), $cd['description']), 'edit_url' => "config.php?display=customdests&destid=" . $cd['destid']);
            return $tmparr;
        }
    }
    // Didn't find it.
    return false;
}
开发者ID:umjinsun12,项目名称:dngshin,代码行数:34,代码来源:functions.inc.php

示例2: _

    ?>
	<span>
	<?php 
    echo _("Choose un-identified destinations on your system to add to the Custom Destination Registry. This will insert the chosen entry into the Custom Destination box above.");
    ?>
	</span>
      </a>
    </td>
    <td>
      <select onChange="insertDest();" id="insdest">
	<option value=""><?php 
    echo _("(pick destination)");
    ?>
</option>
	<?php 
    $results = \FreePBX::Customappsreg()->getUnknownDests();
    foreach ($results as $thisdest) {
        echo "<option value='{$thisdest}'>{$thisdest}</option>\n";
    }
    ?>
      </select>
    </td>
  </tr>
<?php 
}
// endif (!$usage_list)
?>

  <tr>
    <td>
      <a href="#" class="info"><?php 
开发者ID:umjinsun12,项目名称:dngshin,代码行数:31,代码来源:page.customdests.php


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