本文整理汇总了PHP中app::getProjectChoicesByUser方法的典型用法代码示例。如果您正苦于以下问题:PHP app::getProjectChoicesByUser方法的具体用法?PHP app::getProjectChoicesByUser怎么用?PHP app::getProjectChoicesByUser使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app
的用法示例。
在下文中一共展示了app::getProjectChoicesByUser方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeNew
public function executeNew(sfWebRequest $request)
{
if ($request->hasParameter('projects_id')) {
$this->forward404Unless($projects = Doctrine_Core::getTable('Projects')->createQuery()->addWhere('id=?', $request->getParameter('projects_id'))->fetchOne(), sprintf('Object projects does not exist (%s).', $request->getParameter('projects_id')));
$this->checkProjectsAccess($projects);
$this->checkDiscussionsAccess('insert', false, $projects);
$this->form = new DiscussionsForm(null, array('projects' => $projects, 'sf_user' => $this->getUser()));
} else {
$this->checkDiscussionsAccess('insert');
}
$this->choices = app::getProjectChoicesByUser($this->getUser(), true, 'discussions', true);
if (count($this->choices) == 2) {
unset($this->choices['']);
}
}
示例2: explode
<table>
<tr>
<?php
echo app::getReportFormFilterByTable('Status', 'projects_reports[projects_status_id]', 'ProjectsStatus', $form['projects_status_id']->getValue());
?>
<?php
echo app::getReportFormFilterByTable('Type', 'projects_reports[projects_type_id]', 'ProjectsTypes', $form['projects_type_id']->getValue());
?>
</tr>
</table>
</td>
<?php
if (count($choices = app::getProjectChoicesByUser($sf_user, true)) > 0) {
if (!is_string($v = $form['projects_id']->getValue())) {
$v = '';
}
echo '<td style="padding-right: 10px;"><b>' . __('Projects') . '</b><br>' . select_tag('projects_reports[projects_id]', explode(',', $v), array('choices' => $choices, 'multiple' => true), array('style' => 'height: 400px; width: 250px;')) . '</td>';
}
if (count($choices = app::getItemsChoicesByTable('Users', true)) > 0 and (Users::hasAccess('insert', 'projects', $sf_user) or Users::hasAccess('edit', 'projects', $sf_user))) {
if (!is_string($v = $form['in_team']->getValue())) {
$v = '';
}
echo '<td style="padding-right: 10px;"><b>' . __('In Team') . '</b><br>' . select_tag('projects_reports[in_team]', explode(',', $v), array('choices' => $choices), array('style' => 'width: 250px;')) . '</td>';
}
?>
</tr>
</table>
示例3: __
<td>
<table>
<tr>
<?php
echo app::getReportFormFilterByTable('Status', 'projects_reports[projects_status_id]', 'ProjectsStatus', $form['projects_status_id']->getValue());
?>
<?php
echo app::getReportFormFilterByTable('Type', 'projects_reports[projects_type_id]', 'ProjectsTypes', $form['projects_type_id']->getValue());
?>
</tr>
</table>
</td>
<?php
if (count($choices = app::getProjectChoicesByUser($sf_user, true, 'discussions')) > 0) {
if (!is_string($v = $form['projects_id']->getValue())) {
$v = '';
}
echo '<td style="padding-right: 10px;"><b>' . __('Projects') . '</b><br>' . select_tag('discussions_reports[projects_id]', explode(',', $v), array('choices' => $choices, 'multiple' => true), array('style' => 'height: 400px; width: 250px;')) . '</td>';
}
?>
</tr>
</table>
</div>
</div>
<br>
<input type="submit" value="<?php
echo __('Save');
?>