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