本文整理汇总了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;
}
示例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