當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。