當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。