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


PHP Tracker_FormElement_Field::getTracker方法代码示例

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


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

示例1: getFullRESTValue

 public function getFullRESTValue(Tracker_FormElement_Field $field)
 {
     $class_user_representation = '\\Tuleap\\Project\\REST\\UserGroupRepresentation';
     $ugroup_representation = new $class_user_representation();
     $ugroup_manager = new UGroupManager();
     $project = $field->getTracker()->getProject();
     $ugroup_representation->build($project->getID(), $ugroup_manager->getById($this->getUgroupId()));
     return $ugroup_representation;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:9,代码来源:Tracker_FormElement_Field_List_Bind_UgroupsValue.class.php

示例2: getFieldData

 /**
  * Extract Field data from XML input
  *
  * @param Tracker_FormElement_Field $field
  * @param SimpleXMLElement $field_change
  *
  * @return mixed
  */
 public function getFieldData(Tracker_FormElement_Field $field, SimpleXMLElement $field_change)
 {
     $data = array('use_artifact_permissions' => (int) $field_change['use_perm'], 'u_groups' => array());
     foreach ($field_change->ugroup as $ugroup_xml) {
         if (isset($ugroup_xml['ugroup_id'])) {
             $data['u_groups'][] = (int) $ugroup_xml['ugroup_id'];
         } elseif (isset($ugroup_xml['ugroup_name'])) {
             $ugroup_manager = new UGroupManager();
             $ugroup = $ugroup_manager->getUGroupByName($field->getTracker()->getProject(), (string) $ugroup_xml['ugroup_name']);
             $data['u_groups'][] = $ugroup->getId();
         }
     }
     return $data;
 }
开发者ID:rinodung,项目名称:tuleap,代码行数:22,代码来源:XMLImportFieldStrategyPermissionsOnArtifact.class.php

示例3: isWorkflowField

 /**
  * Say if a field is used to define a workflow
  *
  * @param Tracker_FormElement_Field $field The field
  *
  * @return bool
  */
 public function isWorkflowField(Tracker_FormElement_Field $field)
 {
     $workflow = $this->getWorkflowByTrackerId($field->getTracker()->getId());
     if ($workflow) {
         return $field->getId() == $workflow->getFieldId();
     }
     return false;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:15,代码来源:WorkflowFactory.class.php

示例4: getBind

 /**
  * Build a binder associated to a list field.
  * @param Tracker_FormElement_Field $field
  * @param string $type ('ug', 'submit', 'Static')
  */
 public function getBind($field, $type)
 {
     $default_value = array();
     $dao = new Tracker_FormElement_Field_List_Bind_DefaultvalueDao();
     foreach ($dao->searchByFieldId($field->id) as $row) {
         $default_value[$row['value_id']] = true;
     }
     $decorators = array();
     $dao = new Tracker_FormElement_Field_List_BindDecoratorDao();
     foreach ($dao->searchByFieldId($field->id) as $row) {
         $decorators[$row['value_id']] = new Tracker_FormElement_Field_List_BindDecorator($row['field_id'], $row['value_id'], $row['red'], $row['green'], $row['blue']);
     }
     $bind = new Tracker_FormElement_Field_List_Bind_Null($field);
     switch ($type) {
         case self::STATIK:
             $dao = new Tracker_FormElement_Field_List_Bind_StaticDao();
             if ($row = $dao->searchByFieldId($field->id)->getRow()) {
                 $values = array();
                 $dao = new Tracker_FormElement_Field_List_Bind_Static_ValueDao();
                 foreach ($dao->searchByFieldId($field->id, $row['is_rank_alpha']) as $row_value) {
                     $values[$row_value['id']] = $this->getStaticValueInstance($row_value['id'], $row_value['label'], $row_value['description'], $row_value['rank'], $row_value['is_hidden']);
                 }
                 $bind = new Tracker_FormElement_Field_List_Bind_Static($field, $row['is_rank_alpha'], $values, $default_value, $decorators);
             }
             break;
         case self::USERS:
             $dao = new Tracker_FormElement_Field_List_Bind_UsersDao();
             if ($row = $dao->searchByFieldId($field->id)->getRow()) {
                 $bind = new Tracker_FormElement_Field_List_Bind_Users($field, $row['value_function'], $default_value, $decorators);
             }
             break;
         case self::UGROUPS:
             $values = array();
             foreach ($this->getUgroupsValueDao()->searchByFieldId($field->id) as $row_value) {
                 $values[$row_value['id']] = $this->getUgroupsValueInstance($row_value['id'], $field->getTracker()->getProject(), $row_value['ugroup_id'], $row_value['is_hidden']);
             }
             $bind = new Tracker_FormElement_Field_List_Bind_Ugroups($field, array_filter($values), $default_value, $decorators, $this->ugroup_manager, $this->getUgroupsValueDao());
             break;
         default:
             trigger_error('Unknown bind "' . $type . '"', E_USER_WARNING);
             break;
     }
     return $bind;
 }
开发者ID:ndjido,项目名称:tuleap,代码行数:49,代码来源:Tracker_FormElement_Field_List_BindFactory.class.php


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