本文整理汇总了PHP中app::countItemsByTable方法的典型用法代码示例。如果您正苦于以下问题:PHP app::countItemsByTable方法的具体用法?PHP app::countItemsByTable怎么用?PHP app::countItemsByTable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app
的用法示例。
在下文中一共展示了app::countItemsByTable方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeOrderByMenu
public function executeOrderByMenu(sfWebRequest $request)
{
$params = $request->hasParameter('projects_id') ? '&projects_id=' . $request->getParameter('projects_id') : '';
$m = array();
$m[] = array('title' => __('Date Added'), 'url' => $this->module . '/index?set_order=date_added' . $params);
switch ($this->module) {
case 'projects':
$m[] = array('title' => __('Name'), 'url' => $this->module . '/index?set_order=name');
if (app::countItemsByTable('ProjectsStatus') > 0) {
$m[] = array('title' => __('Status'), 'url' => $this->module . '/index?set_order=status');
}
if (app::countItemsByTable('ProjectsTypes') > 0) {
$m[] = array('title' => __('Type'), 'url' => $this->module . '/index?set_order=type');
}
break;
case 'tasks':
$m[] = array('title' => __('Name'), 'url' => $this->module . '/index?set_order=name' . $params);
if (app::countItemsByTable('TasksPriority') > 0) {
$m[] = array('title' => __('Priority'), 'url' => $this->module . '/index?set_order=priority' . $params);
}
if (app::countItemsByTable('TasksStatus') > 0) {
$m[] = array('title' => __('Status'), 'url' => $this->module . '/index?set_order=status' . $params);
}
if (app::countItemsByTable('TasksTypes') > 0) {
$m[] = array('title' => __('Type'), 'url' => $this->module . '/index?set_order=type' . $params);
}
if (app::countItemsByTable('TasksLabels') > 0) {
$m[] = array('title' => __('Label'), 'url' => $this->module . '/index?set_order=label' . $params);
}
break;
case 'tickets':
$m[] = array('title' => __('Name'), 'url' => $this->module . '/index?set_order=name' . $params);
if (app::countItemsByTable('TicketsStatus') > 0) {
$m[] = array('title' => __('Status'), 'url' => $this->module . '/index?set_order=status' . $params);
}
if (app::countItemsByTable('TicketsTypes') > 0) {
$m[] = array('title' => __('Type'), 'url' => $this->module . '/index?set_order=type' . $params);
}
if (app::countItemsByTable('Departments') > 0) {
$m[] = array('title' => __('Department'), 'url' => $this->module . '/index?set_order=department' . $params);
}
break;
case 'discussions':
$m[] = array('title' => __('Name'), 'url' => $this->module . '/index?set_order=name' . $params);
if (app::countItemsByTable('DiscussionsStatus') > 0) {
$m[] = array('title' => __('Status'), 'url' => $this->module . '/index?set_order=status' . $params);
}
break;
}
$this->m = array(array('title' => __('Order By'), 'submenu' => $m));
}
示例2:
</th>
<td>
<?php
echo $form['projects_phases_id']->renderError();
?>
<?php
echo $form['projects_phases_id'];
?>
</td>
</tr>
<?php
}
?>
<?php
if (app::countItemsByTable('Versions', $sf_request->getParameter('projects_id')) > 0) {
?>
<tr>
<th><?php
echo $form['versions_id']->renderLabel();
?>
</th>
<td>
<?php
echo $form['versions_id']->renderError();
?>
<?php
echo $form['versions_id'];
?>
</td>
</tr>
示例3: __
<th><?php
echo __('Label');
?>
</th>
<td>
<?php
echo select_tag('tasks_labels_id', '', array('choices' => app::getItemsChoicesByTable('TasksLabels', true)));
?>
</td>
</tr>
<?php
}
?>
<?php
if (app::countItemsByTable('TasksTypes') > 0) {
?>
<tr>
<th><?php
echo __('Type');
?>
</th>
<td>
<?php
echo select_tag('tasks_types_id', '', array('choices' => app::getItemsChoicesByTable('TasksTypes', true)));
?>
</td>
</tr>
<?php
}
?>
示例4: input_hidden_tag
echo input_hidden_tag('projects_id', $sf_request->getParameter('projects_id'));
?>
<input type="submit" value="<?php
echo __('Save');
?>
" class="btn" />
</td>
</tr>
</tfoot>
<tbody>
<?php
echo $form->renderGlobalErrors();
?>
<?php
if (app::countItemsByTable('VersionsStatus') > 0) {
?>
<tr>
<th><?php
echo $form['versions_status_id']->renderLabel();
?>
</th>
<td>
<?php
echo $form['versions_status_id']->renderError();
?>
<?php
echo $form['versions_status_id'];
?>
</td>
</tr>
示例5:
</th>
<td>
<?php
echo $form['projects_types_id']->renderError();
?>
<?php
echo $form['projects_types_id'];
?>
</td>
</tr>
<?php
}
?>
<?php
if (app::countItemsByTable('ProjectsStatus') > 0) {
?>
<tr>
<th><?php
echo $form['projects_status_id']->renderLabel();
?>
</th>
<td>
<?php
echo $form['projects_status_id']->renderError();
?>
<?php
echo $form['projects_status_id'];
?>
</td>
示例6: select_tag
<td>
<?php
echo select_tag('projects_types_id', '', array('choices' => app::getItemsChoicesByTable('ProjectsTypes', true)));
?>
</td>
</tr>
<?php
}
?>
<?php
}
?>
<?php
if (app::countItemsByTable('ProjectsStatus') > 0 and $form->getObject()->isNew()) {
?>
<tr>
<th><?php
echo __('Status');
?>
</th>
<td>
<?php
echo select_tag('projects_status_id', '', array('choices' => app::getItemsChoicesByTable('ProjectsStatus', true)));
?>
</td>
</tr>
<?php
}
示例7:
</th>
<td>
<?php
echo $form['tickets_types_id']->renderError();
?>
<?php
echo $form['tickets_types_id'];
?>
</td>
</tr>
<?php
}
?>
<?php
if (app::countItemsByTable('TicketsStatus') > 0) {
?>
<tr>
<th><?php
echo $form['tickets_status_id']->renderLabel();
?>
</th>
<td>
<?php
echo $form['tickets_status_id']->renderError();
?>
<?php
echo $form['tickets_status_id'];
?>
</td>
</tr>
示例8: getReportFormFilterByTable
public static function getReportFormFilterByTable($title, $field, $t, $values, $sf_user = false)
{
if (app::countItemsByTable($t) > 0) {
if (!is_string($values)) {
$values = '';
}
return '<td style="padding-right: 10px;"><b>' . __($title) . '</b><br>' . select_tag($field, explode(',', $values), array('choices' => app::getItemsChoicesByTable($t, false, false, $sf_user), 'expanded' => true, 'multiple' => true)) . '</td>';
} else {
return '';
}
}
示例9: __
echo __('General');
?>
</a></li>
<li><a href="#"><?php
echo __('Attachments');
?>
</a></li>
</ul>
<div class="panes">
<div>
<table>
<?php
if (app::countItemsByTable('DiscussionsStatus') > 0 and $form->getObject()->isNew()) {
?>
<tr>
<th><?php
echo $form['discussions_status_id']->renderLabel();
?>
</th>
<td>
<?php
echo $form['discussions_status_id']->renderError();
?>
<?php
echo $form['discussions_status_id'];
?>
</td>
</tr>
示例10: listingController
<?php
$lc = new listingController('projects', $url_params, $sf_request, $sf_user);
$extra_fields = ExtraFieldsList::getFieldsByType('projects', $sf_user);
$totals = array();
$is_filter = array();
$is_filter['status'] = app::countItemsByTable('ProjectsStatus');
$is_filter['type'] = app::countItemsByTable('ProjectsTypes');
$has_comments_access = Users::hasAccess('view', 'projectsComments', $sf_user);
?>
<table width="100%">
<tr>
<td>
<table>
<tr>
<?php
if ($display_insert_button) {
?>
<td style="padding-right: 15px;"><?php
echo $lc->insert_button(__('Add Project'));
?>
</td>
<?php
}
?>
<td style="padding-right: 15px;"><div id="tableListingMultipleActionsMenu"><?php
echo $lc->rednerWithSelectedAction($tlId);
?>
</div></td>
示例11: include_component
<?php
include_component('projects', 'shortInfo', array('projects' => $projects));
?>
<h1><?php
echo __('Projects Phases');
?>
</h1>
<?php
$in_listing = array();
$in_listing['status'] = app::countItemsByTable('PhasesStatus');
$lc = new cfgListingController($sf_context->getModuleName(), 'projects_id=' . $projects->getId());
echo $lc->insert_button(__('Add Phase'));
?>
<table class="tableListing">
<thead>
<tr>
<th><?php
echo __('Action');
?>
</th>
<?php
if ($in_listing['status']) {
?>
<th><?php
echo __('Status');
?>
示例12: __
<ul class="tabs">
<li><a href="#"><?php
echo __('General');
?>
</a></li>
<li><a href="#"><?php
echo __('Attachments');
?>
</a></li>
</ul>
<div class="panes">
<div>
<table>
<?php
if (app::countItemsByTable('DiscussionsStatus') > 0) {
?>
<tr>
<th><?php
echo $form['discussions_status_id']->renderLabel();
?>
</th>
<td>
<?php
echo $form['discussions_status_id']->renderError();
?>
<?php
echo $form['discussions_status_id'];
?>
</td>
</tr>
示例13: array
echo $form['tickets_status_id'];
?>
</td>
</tr>
<?php
}
?>
<?php
if (Users::hasTicketsAccess('edit', $sf_user, $tickets, $projects) and $form->getObject()->isNew()) {
?>
<?php
if (app::countItemsByTable('TicketsTypes') > 0) {
?>
<tr>
<th><?php
echo __('Type');
?>
</th>
<td>
<?php
echo select_tag('tickets_types_id', '', array('choices' => app::getItemsChoicesByTable('TicketsTypes', true)));
?>
</td>
</tr>
<?php
}
?>
示例14: listingController
<?php
$lc = new listingController('tickets', $url_params, $sf_request, $sf_user);
$extra_fields = ExtraFieldsList::getFieldsByType('tickets', $sf_user);
$totals = array();
$is_filter = array();
$is_filter['status'] = app::countItemsByTable('TicketsStatus');
$is_filter['type'] = app::countItemsByTable('TicketsTypes');
$has_comments_access = Users::hasAccess('view', 'ticketsComments', $sf_user);
?>
<table width="100%">
<tr>
<td>
<table>
<tr>
<?php
if ($display_insert_button) {
?>
<td style="padding-right: 15px;"><?php
echo $lc->insert_button(__('Add Ticket'));
?>
</td>
<?php
}
?>
<td style="padding-right: 15px;"><div id="tableListingMultipleActionsMenu"><?php
echo $lc->rednerWithSelectedAction($tlId);
?>
</div></td>
<td><?php
示例15: include_component
<?php
include_component('projects', 'shortInfo', array('projects' => $projects));
?>
<h1><?php
echo __('Tasks Versions');
?>
</h1>
<?php
$in_listing = array();
$in_listing['status'] = app::countItemsByTable('VersionsStatus');
$lc = new cfgListingController($sf_context->getModuleName(), 'projects_id=' . $projects->getId());
echo $lc->insert_button(__('Add Version'));
?>
<table class="tableListing">
<thead>
<tr>
<th><?php
echo __('Action');
?>
</th>
<?php
if ($in_listing['status']) {
?>
<th><?php
echo __('Status');
?>