本文整理汇总了PHP中FreePBX::Timeconditions方法的典型用法代码示例。如果您正苦于以下问题:PHP FreePBX::Timeconditions方法的具体用法?PHP FreePBX::Timeconditions怎么用?PHP FreePBX::Timeconditions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FreePBX
的用法示例。
在下文中一共展示了FreePBX::Timeconditions方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
#!/usr/bin/env php
<?php
//include bootstrap
$restrict_mods = array('timeconditions' => true);
$bootstrap_settings['freepbx_auth'] = false;
if (!@(include_once getenv('FREEPBX_CONF') ? getenv('FREEPBX_CONF') : '/etc/freepbx.conf')) {
include_once '/etc/asterisk/freepbx.conf';
}
$tc = \FreePBX::Timeconditions();
$conditions = $tc->listTimeconditions();
$groups = $tc->listTimeGroups();
$debug = false;
if (isset($argv[1]) && $argv[1] == "--debug") {
$debug = true;
print_r("Time Now:" . date("H:i|D|j|M|e") . "\n\n");
}
foreach ($conditions as $item) {
tcout($debug, "==Working with TimeCondition:" . $item['displayname'] . "==");
if (!$item['invert_hint']) {
$not_inuse = 'NOT_INUSE';
//true && deactivated
$inuse = 'INUSE';
//false && activated
tcout($debug, "INVERTED BLF: false (NOT_INUSE = " . $not_inuse . " & INUSE = " . $inuse . ")");
} else {
$not_inuse = 'INUSE';
//true && deactivated
$inuse = 'NOT_INUSE';
//false && activated
tcout($debug, "INVERTED BLF: true (NOT_INUSE = " . $not_inuse . " & INUSE = " . $inuse . ")");
}
示例2: load_view
break;
default:
$content = load_view(__DIR__ . '/views/timegroups/grid.php', array('request' => $request));
break;
}
?>
<div class="container-fluid">
<h1><?php
echo $heading;
?>
</h1>
<?php
$errormsg = \FreePBX::Timeconditions()->errormsg;
if (!empty($errormsg)) {
echo '<div class="alert alert-danger">' . $errormsg . '</div>';
\FreePBX::Timeconditions()->errormsg = '';
}
?>
<div class = "display full-border">
<div class="row">
<div class="col-sm-12">
<div class="fpbx-container">
<div class="display full-border">
<?php
echo $content;
?>
</div>
</div>
</div>
</div>
</div>
示例3: timeconditions_timegroups_buildtime
function timeconditions_timegroups_buildtime($hour_start, $minute_start, $hour_finish, $minute_finish, $wday_start, $wday_finish, $mday_start, $mday_finish, $month_start, $month_finish)
{
_timeconditions_backtrace();
return FreePBX::Timeconditions()->buildTime($hour_start, $minute_start, $hour_finish, $minute_finish, $wday_start, $wday_finish, $mday_start, $mday_finish, $month_start, $month_finish);
}