本文整理汇总了PHP中Q::any方法的典型用法代码示例。如果您正苦于以下问题:PHP Q::any方法的具体用法?PHP Q::any怎么用?PHP Q::any使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Q
的用法示例。
在下文中一共展示了Q::any方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __
echo __('Source');
?>
</th>
<td><?php
echo $ticket->getSource();
?>
</td>
</tr>
</tbody>
</table>
<!-- Custom Data -->
<?php
foreach (DynamicFormEntry::forTicket($ticket->getId()) as $form) {
// Skip core fields shown earlier in the ticket view
$answers = $form->getAnswers()->exclude(Q::any(array('field__flags__hasbit' => DynamicFormField::FLAG_EXT_STORED, Q::not(array('field__flags__hasbit' => DynamicFormField::FLAG_CLIENT_VIEW)), 'field__name__in' => array('subject', 'priority'))));
if (count($answers) == 0) {
continue;
}
?>
<table class="custom-data" cellspacing="0" cellpadding="4" width="100%" border="0">
<tr><td colspan="2" class="headline flush-left"><?php
echo $form->getTitle();
?>
</th></tr>
<?php
foreach ($answers as $a) {
if (!($v = $a->display())) {
continue;
}
?>
示例2: array
$sortOptions = array('id' => 'number', 'subject' => 'cdata__subject', 'status' => 'status__name', 'dept' => 'dept__name', 'date' => 'created');
$orderWays = array('DESC' => '-', 'ASC' => '');
//Sorting options...
$order_by = $order = null;
$sort = $_REQUEST['sort'] && $sortOptions[strtolower($_REQUEST['sort'])] ? strtolower($_REQUEST['sort']) : 'date';
if ($sort && $sortOptions[$sort]) {
$order_by = $sortOptions[$sort];
}
$order_by = $order_by ?: $sortOptions['date'];
if ($_REQUEST['order'] && $orderWays[strtoupper($_REQUEST['order'])]) {
$order = $orderWays[strtoupper($_REQUEST['order'])];
}
$x = $sort . '_sort';
${$x} = ' class="' . strtolower($_REQUEST['order'] ?: 'desc') . '" ';
// Add visibility constraints
$tickets->filter(Q::any(array('user_id' => $thisclient->getId(), 'thread__collaborators__user_id' => $thisclient->getId())));
// Perform basic search
if ($settings['keywords']) {
$q = $settings['keywords'];
if (is_numeric($q)) {
$tickets->filter(array('number__startswith' => $q));
} else {
//Deep search!
// Use the search engine to perform the search
$tickets = $ost->searcher->find($q, $tickets);
}
}
if ($settings['topic_id']) {
$tickets = $tickets->filter(array('topic_id' => $settings['topic_id']));
}
TicketForm::ensureDynamicDataView();
示例3: foreach
}
}
?>
</select>
</div>
<div class="col-md-3">
<input class="btn btn-block btn-info" type="submit" value="Search" id="searchSubmit" class="button">
</div>
</div>
</div>
</form>
</div>
<div class="col-md-12">
<div class="kb-results">
<?php
$categories = Category::objects()->exclude(Q::any(array('ispublic' => Category::VISIBILITY_PRIVATE, 'faqs__ispublished' => FAQ::VISIBILITY_PRIVATE)))->annotate(array('faq_count' => SqlAggregate::COUNT('faqs')))->filter(array('faq_count__gt' => 0));
if ($categories->exists(true)) {
?>
<div class="well"><?php
echo __('Click on the category to browse FAQs.');
?>
</div>
<ul id="kb">
<?php
foreach ($categories as $C) {
?>
<li>
<i></i>
<div style="margin-left:45px">
<h4><?php
echo sprintf('<a href="faq.php?cid=%d">%s (%d)</a>', $C->getId(), Format::htmlchars($C->getLocalName()), $C->faq_count);