本文整理汇总了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);
}
示例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);
}
示例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');
}
示例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));
}
示例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 .= ': ';
$html .= $this->formatAggregateResult($row['value']);
$html .= '</label>';
}
}
}
} else {
$html .= '<label>';
$html .= $this->formatAggregateResult($result);
$html .= '<label>';
}
$html .= '</td>';
}
return $html;
}