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


PHP Tracker_FormElement_Field::getName方法代码示例

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


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

示例1: itCreatesFieldChangeNodeInChangesetNode

 public function itCreatesFieldChangeNodeInChangesetNode()
 {
     $this->exporter->export($this->artifact_xml, $this->changeset_xml, mock('Tracker_Artifact'), $this->changeset_value);
     $field_change = $this->changeset_xml->field_change;
     $this->assertEqual((string) $field_change['type'], 'int');
     $this->assertEqual((string) $field_change['field_name'], $this->field->getName());
     $this->assertEqual($field_change->value, 123);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:8,代码来源:ChangesetValueIntegerXMLExporterTest.php

示例2: itCreatesFieldChangeNodeInChangesetNode

 public function itCreatesFieldChangeNodeInChangesetNode()
 {
     $this->exporter->export($this->artifact_xml, $this->changeset_xml, $this->artifact, $this->changeset_value);
     $field_change = $this->changeset_xml->field_change;
     $this->assertEqual(count($field_change->value), 2);
     $this->assertEqual((string) $field_change['type'], 'file');
     $this->assertEqual((string) $field_change['field_name'], $this->field->getName());
     $this->assertEqual((string) $field_change->value[0]['ref'], $this->id_prefix . 123);
     $this->assertEqual((string) $field_change->value[1]['ref'], $this->id_prefix . 456);
 }
开发者ID:rinodung,项目名称:tuleap,代码行数:10,代码来源:ChangesetValueFileXMLExporterTest.php

示例3: itCreatesFieldChangeNodeInChangesetNode

 public function itCreatesFieldChangeNodeInChangesetNode()
 {
     $this->exporter->export($this->artifact_xml, $this->changeset_xml, mock('Tracker_Artifact'), $this->changeset_value);
     $field_change = $this->changeset_xml->field_change;
     $this->assertEqual((string) $field_change['type'], 'permissions_on_artifact');
     $this->assertEqual((string) $field_change['field_name'], $this->field->getName());
     $this->assertEqual((string) $field_change['use_perm'], '1');
     $this->assertEqual((string) $field_change->ugroup[0]['ugroup_name'], 'ug01');
     $this->assertEqual((string) $field_change->ugroup[1]['ugroup_name'], 'ug02');
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:10,代码来源:ChangesetValuePermissionsOnArtifactXMLExporterTest.php

示例4: stub

 function testValidateSubmitFieldRequiredNotSubmittedNoDefaultValue()
 {
     stub($this->field1)->isValid()->returns(false);
     stub($this->field1)->userCanSubmit()->returns(true);
     stub($this->field1)->isRequired()->returns(true);
     stub($this->field1)->hasDefaultValue()->returns(false);
     stub($this->field2)->isValid()->returns(true);
     stub($this->field3)->isValid()->returns(true);
     stub($this->workflow)->validate()->returns(true);
     $GLOBALS['Language']->expectOnce('getText', array('plugin_tracker_common_artifact', 'err_required', $this->field1->getLabel() . ' (' . $this->field1->getName() . ')'));
     $fields_data = array();
     $this->assertFalse($this->initial_changeset_fields_validator->validate($this->artifact, $fields_data));
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:13,代码来源:FieldsValidatorTest.php

示例5: fetchAddAggregatesUsedFunctionsValue

 private function fetchAddAggregatesUsedFunctionsValue(Tracker_FormElement_Field $field, array $used_aggregates, array $results)
 {
     if (!isset($used_aggregates[$field->getId()])) {
         return '';
     }
     $hp = Codendi_HTMLPurifier::instance();
     $html = '';
     foreach ($used_aggregates[$field->getId()] as $function) {
         $result_key = $field->getName() . '_' . $function;
         if (!isset($results[$result_key])) {
             continue;
         }
         $result = $results[$result_key];
         $html .= '<td>';
         if (is_a($result, 'DataAccessResult')) {
             if ($row = $result->getRow()) {
                 if (isset($row[$result_key])) {
                     //this case is for multiple selectbox/count
                     $html .= '<label>';
                     $html .= $this->formatAggregateResult($row[$result_key]);
                     $html .= '<label>';
                 } else {
                     foreach ($result as $row) {
                         $html .= '<label>';
                         if ($row['label'] === null) {
                             $html .= '<em>' . $GLOBALS['Language']->getText('global', 'null') . '</em>';
                         } else {
                             $html .= $hp->purify($row['label']);
                         }
                         $html .= ':&nbsp;';
                         $html .= $this->formatAggregateResult($row['value']);
                         $html .= '</label>';
                     }
                 }
             }
         } else {
             $html .= '<label>';
             $html .= $this->formatAggregateResult($result);
             $html .= '<label>';
         }
         $html .= '</td>';
     }
     return $html;
 }
开发者ID:rinodung,项目名称:tuleap,代码行数:44,代码来源:Tracker_Report_Renderer_Table.class.php


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