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


PHP app::getDefaultValueByTable方法代码示例

本文整理汇总了PHP中app::getDefaultValueByTable方法的典型用法代码示例。如果您正苦于以下问题:PHP app::getDefaultValueByTable方法的具体用法?PHP app::getDefaultValueByTable怎么用?PHP app::getDefaultValueByTable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在app的用法示例。


在下文中一共展示了app::getDefaultValueByTable方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: configure

 public function configure()
 {
     $this->widgetSchema['phases_status_id'] = new sfWidgetFormChoice(array('choices' => app::getItemsChoicesByTable('PhasesStatus')));
     $this->setDefault('phases_status_id', app::getDefaultValueByTable('PhasesStatus'));
     $this->widgetSchema['projects_id'] = new sfWidgetFormInputHidden();
     $this->widgetSchema['due_date'] = new sfWidgetFormInput(array(), array('class' => 'datepicker'));
     $this->widgetSchema['name']->setAttributes(array('class' => 'required'));
     $this->widgetSchema->setLabels(array('phases_status_id' => 'Status', 'due_date' => 'Due Date'));
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:9,代码来源:ProjectsPhasesForm.class.php

示例2: configure

 public function configure()
 {
     $this->widgetSchema['projects_types_id'] = new sfWidgetFormChoice(array('choices' => app::getItemsChoicesByTable('ProjectsTypes')));
     $this->setDefault('projects_types_id', app::getDefaultValueByTable('ProjectsTypes'));
     $this->widgetSchema['projects_status_id'] = new sfWidgetFormChoice(array('choices' => app::getItemsChoicesByTable('ProjectsStatus')));
     $this->setDefault('projects_status_id', app::getDefaultValueByTable('ProjectsStatus'));
     $this->widgetSchema['name']->setAttributes(array('size' => '60', 'class' => 'required'));
     $this->widgetSchema['description']->setAttributes(array('class' => 'editor'));
     $this->widgetSchema['created_by'] = new sfWidgetFormInputHidden();
     $this->widgetSchema['created_at'] = new sfWidgetFormInputHidden();
     $this->setDefault('created_at', date('Y-m-d H:i:s'));
     $this->widgetSchema->setLabels(array('projects_types_id' => 'Type', 'projects_status_id' => 'Status'));
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:13,代码来源:ProjectsForm.class.php

示例3: executeSetDefaultPhases

 public function executeSetDefaultPhases(sfWebRequest $request)
 {
     if ($phase = Doctrine_Core::getTable('Phases')->find($request->getParameter('phase_id'))) {
         foreach (explode("\n", $phase->getDefaultValues()) as $v) {
             if (strlen(trim($v)) > 0) {
                 $p = new ProjectsPhases();
                 $p->setName($v)->setProjectsId($request->getParameter('projects_id'));
                 if ($status = app::getDefaultValueByTable('PhasesStatus')) {
                     $p->setPhasesStatusId($status);
                 }
                 $p->save();
             }
         }
     }
     $this->redirect('projectsPhases/index?projects_id=' . $request->getParameter('projects_id'));
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:16,代码来源:actions.class.php

示例4: configure

 public function configure()
 {
     $projects = $this->getOption('projects');
     $sf_user = $this->getOption('sf_user');
     $this->widgetSchema['discussions_status_id'] = new sfWidgetFormChoice(array('choices' => app::getItemsChoicesByTable('DiscussionsStatus')));
     $this->setDefault('discussions_status_id', app::getDefaultValueByTable('DiscussionsStatus'));
     $this->widgetSchema['assigned_to'] = new sfWidgetFormChoice(array('choices' => Users::getChoices(array_merge(array($sf_user->getAttribute('id')), array_filter(explode(',', $projects->getTeam()))), 'discussions'), 'expanded' => true, 'multiple' => true));
     if (Users::hasAccess('edit', 'projects', $sf_user, $projects->getId())) {
         $this->widgetSchema['users_id'] = new sfWidgetFormChoice(array('choices' => Users::getChoices(array_merge(array($sf_user->getAttribute('id')), array_filter(explode(',', $projects->getTeam()))), 'discussions_insert')));
     } else {
         $this->widgetSchema['users_id'] = new sfWidgetFormInputHidden();
     }
     $this->widgetSchema['name']->setAttributes(array('size' => '60', 'class' => 'required'));
     $this->widgetSchema['description']->setAttributes(array('class' => 'editor'));
     $this->widgetSchema['projects_id'] = new sfWidgetFormInputHidden();
     $this->widgetSchema->setLabels(array('discussions_status_id' => 'Status', 'assigned_to' => 'Assigned To', 'users_id' => 'Created By'));
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:17,代码来源:DiscussionsForm.class.php

示例5: configure

 public function configure()
 {
     $projects = $this->getOption('projects');
     $sf_user = $this->getOption('sf_user');
     $this->widgetSchema['tasks_status_id'] = new sfWidgetFormChoice(array('choices' => app::getItemsChoicesByTable('TasksStatus')));
     $this->setDefault('tasks_status_id', app::getDefaultValueByTable('TasksStatus'));
     $this->widgetSchema['tasks_priority_id'] = new sfWidgetFormChoice(array('choices' => app::getItemsChoicesByTable('TasksPriority')));
     $this->setDefault('tasks_priority_id', app::getDefaultValueByTable('TasksPriority'));
     $this->widgetSchema['tasks_type_id'] = new sfWidgetFormChoice(array('choices' => app::getItemsChoicesByTable('TasksTypes')));
     $this->setDefault('tasks_type_id', app::getDefaultValueByTable('TasksTypes'));
     $this->widgetSchema['tasks_label_id'] = new sfWidgetFormChoice(array('choices' => app::getItemsChoicesByTable('TasksLabels')));
     $this->setDefault('tasks_label_id', app::getDefaultValueByTable('TasksLabels'));
     $this->widgetSchema['tasks_groups_id'] = new sfWidgetFormChoice(array('choices' => app::getItemsChoicesByTable('TasksGroups', true, $projects->getId())));
     $this->widgetSchema['projects_phases_id'] = new sfWidgetFormChoice(array('choices' => app::getItemsChoicesByTable('ProjectsPhases', true, $projects->getId())));
     $this->widgetSchema['versions_id'] = new sfWidgetFormChoice(array('choices' => app::getItemsChoicesByTable('Versions', true, $projects->getId())));
     $this->widgetSchema['progress'] = new sfWidgetFormChoice(array('choices' => Tasks::getProgressChoices()));
     $this->widgetSchema['assigned_to'] = new sfWidgetFormChoice(array('choices' => Users::getChoices(array_merge(array($sf_user->getAttribute('id')), array_filter(explode(',', $projects->getTeam()))), 'tasks'), 'expanded' => true, 'multiple' => true));
     if (Users::hasAccess('edit', 'projects', $sf_user, $projects->getId())) {
         $this->widgetSchema['created_by'] = new sfWidgetFormChoice(array('choices' => Users::getChoices(array_merge(array($sf_user->getAttribute('id')), array_filter(explode(',', $projects->getTeam()))), 'tasks_insert')));
     } else {
         $this->widgetSchema['created_by'] = new sfWidgetFormInputHidden();
     }
     $this->widgetSchema['name']->setAttributes(array('size' => '60', 'class' => 'required'));
     $this->widgetSchema['description']->setAttributes(array('class' => 'editor'));
     $this->widgetSchema['estimated_time']->setAttributes(array('size' => '4'));
     $this->widgetSchema['start_date'] = new sfWidgetFormInput(array(), array('class' => 'datetimepicker'));
     $this->widgetSchema['due_date'] = new sfWidgetFormInput(array(), array('class' => 'datetimepicker'));
     $this->widgetSchema['projects_id'] = new sfWidgetFormInputHidden();
     $this->widgetSchema['closed_date'] = new sfWidgetFormInputHidden();
     $this->widgetSchema['created_at'] = new sfWidgetFormInputHidden();
     $this->setDefault('created_at', date('Y-m-d H:i:s'));
     $this->widgetSchema->setLabels(array('tasks_priority_id' => 'Priority', 'tasks_type_id' => 'Type', 'tasks_label_id' => 'Label', 'projects_phases_id' => 'Phase', 'versions_id' => 'Version', 'tasks_groups_id' => 'Group', 'tasks_status_id' => 'Status', 'estimated_time' => 'Estimated Time', 'start_date' => 'Start Date', 'due_date' => 'Due Date', 'created_by' => 'Created By'));
     unset($this->widgetSchema['discussion_id']);
     unset($this->widgetSchema['tickets_id']);
     unset($this->widgetSchema['work_hours']);
     unset($this->validatorSchema['discussion_id']);
     unset($this->validatorSchema['tickets_id']);
     unset($this->validatorSchema['work_hours']);
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:39,代码来源:TasksForm.class.php

示例6: configure

 public function configure()
 {
     $projects = $this->getOption('projects');
     $sf_user = $this->getOption('sf_user');
     $this->widgetSchema['departments_id'] = new sfWidgetFormChoice(array('choices' => app::getItemsChoicesByTable('Departments')), array('class' => 'required'));
     $this->widgetSchema['tickets_status_id'] = new sfWidgetFormChoice(array('choices' => app::getItemsChoicesByTable('TicketsStatus')));
     $this->setDefault('tickets_status_id', app::getDefaultValueByTable('TicketsStatus'));
     $this->widgetSchema['tickets_types_id'] = new sfWidgetFormChoice(array('choices' => app::getItemsChoicesByTable('TicketsTypes')));
     $this->setDefault('tickets_types_id', app::getDefaultValueByTable('TicketsTypes'));
     if ($projects) {
         if (Users::hasAccess('edit', 'projects', $sf_user, $projects->getId())) {
             $this->widgetSchema['users_id'] = new sfWidgetFormChoice(array('choices' => Users::getChoices(array_merge(array($sf_user->getAttribute('id')), array_filter(explode(',', $projects->getTeam()))), 'tickets_insert')));
         } else {
             $this->widgetSchema['users_id'] = new sfWidgetFormInputHidden();
         }
     }
     $this->widgetSchema['name']->setAttributes(array('size' => '60', 'class' => 'required'));
     $this->widgetSchema['description']->setAttributes(array('class' => 'editor'));
     $this->widgetSchema['projects_id'] = new sfWidgetFormInputHidden();
     $this->widgetSchema['created_at'] = new sfWidgetFormInputHidden();
     $this->setDefault('created_at', date('Y-m-d H:i:s'));
     $this->widgetSchema->setLabels(array('tickets_types_id' => 'Type', 'tickets_status_id' => 'Status', 'departments_id' => 'Department', 'name' => 'Subject', 'users_id' => 'Created By'));
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:23,代码来源:TicketsForm.class.php

示例7: getDefaultFilter

 public static function getDefaultFilter($sf_user, $report_type = 'filter')
 {
     $f = array();
     if (($v = app::getDefaultValueByTable('ProjectsStatus')) > 0) {
         $f['ProjectsStatus'] = $v;
     }
     return $f;
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:8,代码来源:Projects.class.php

示例8: getDefaultFilter

 public static function getDefaultFilter($request, $sf_user)
 {
     $f = array();
     if (($v = app::getDefaultValueByTable('TicketsStatus')) > 0) {
         $f['TicketsStatus'] = $v;
     }
     return $f;
 }
开发者ID:noikiy,项目名称:qdpm,代码行数:8,代码来源:Tickets.class.php


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