当前位置: 首页>>代码示例>>PHP>>正文


PHP app::getProjectChoicesByUser方法代码示例

本文整理汇总了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['']);
     }
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:15,代码来源:actions.class.php

示例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>
开发者ID:noikiy,项目名称:qdpm,代码行数:31,代码来源:_form.php

示例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');
?>
开发者ID:noikiy,项目名称:qdpm,代码行数:31,代码来源:_form.php


注:本文中的app::getProjectChoicesByUser方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。