本文整理汇总了PHP中Tracker_FormElement_Field::getId方法的典型用法代码示例。如果您正苦于以下问题:PHP Tracker_FormElement_Field::getId方法的具体用法?PHP Tracker_FormElement_Field::getId怎么用?PHP Tracker_FormElement_Field::getId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tracker_FormElement_Field
的用法示例。
在下文中一共展示了Tracker_FormElement_Field::getId方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getValue
/**
* Return the value of a field in the current changeset
*
* @param Tracker_FormElement_Field $field The field
*
* @return Tracker_Artifact_ChangesetValue, or null if not found
*/
public function getValue(Tracker_FormElement_Field $field)
{
$values = $this->getValues();
if (isset($values[$field->getId()])) {
return $values[$field->getId()];
}
return null;
}
示例2: getFieldId
/**
* The Id of the (text) field used for initial_effort semantic
*
* @return int The Id of the (numeric) field used for initial_effort semantic, or 0 if no field
*/
public function getFieldId()
{
if ($this->initial_effort_field) {
return $this->initial_effort_field->getId();
} else {
return 0;
}
}
示例3: getMappings
/**
* @return array of Cardwall_OnTop_Config_ValueMapping
*/
public function getMappings(Tracker $tracker, Tracker $mapping_tracker, Tracker_FormElement_Field $mapping_field)
{
// Why does we return a collection indexed on value_id in the case of freestyle mappings, and a collection
// indexed on column_id in the case of status mappings @see getStatusMappings?????????
// Shouldn't we let TrackerMapping do the indexing so that code in TrackerMapping might exploit that?
$mappings = $this->getMappingFieldValuesIndexedByTracker($tracker);
if (isset($mappings[$mapping_tracker->getId()][$mapping_field->getId()])) {
return $mappings[$mapping_tracker->getId()][$mapping_field->getId()];
}
return array();
}
示例4: getTargetFieldId
/**
*
* @return int
*/
public function getTargetFieldId()
{
if ($this->target_field_obj instanceof Tracker_FormElement_Field) {
return $this->target_field_obj->getId();
}
return $this->target_field;
}
示例5: getFullRESTRepresentation
protected function getFullRESTRepresentation($value)
{
$classname_with_namespace = 'Tuleap\\Tracker\\REST\\Artifact\\ArtifactFieldValueFullRepresentation';
$artifact_field_value_full_representation = new $classname_with_namespace();
$artifact_field_value_full_representation->build($this->field->getId(), Tracker_FormElementFactory::instance()->getType($this->field), $this->field->getLabel(), $value);
return $artifact_field_value_full_representation;
}
示例6: getStaticListDataValue
private function getStaticListDataValue(Tracker_FormElement_Field $field, $value)
{
if (isset($value['format']) && (string) $value['format'] === self::FORMAT_ID) {
return $this->xml_fields_mapping->getNewValueId((int) $value);
}
$result = $this->static_value_dao->searchValueByLabel($field->getId(), (string) $value);
$row = $result->getRow();
return (int) $row['id'];
}
示例7: getLastChangesetWithFieldValue
/**
* @return \Tracker_Artifact_Changeset|null
*/
public function getLastChangesetWithFieldValue(Tracker_Artifact $artifact, Tracker_FormElement_Field $field)
{
$dar = $this->dao->searchLastChangesetAndValueForArtifactField($artifact->getId(), $field->getId());
if ($dar) {
$row = $dar->getRow();
$changeset = $this->getChangesetFromRow($artifact, $row);
$value = $field->getChangesetValue($changeset, $row['value_id'], $row['has_changed']);
$changeset->setFieldValue($field, $value);
return $changeset;
}
return null;
}
示例8: isRequiredFieldsValid
/**
* @return bool
*/
private function isRequiredFieldsValid(Tracker $tracker, Tracker_FormElement_Field $title_field, Tracker_FormElement_Field $description_field)
{
$is_required_fields_valid = true;
$form_elements = $tracker->getFormElementFields();
reset($form_elements);
while ($is_required_fields_valid && (list(, $form_element) = each($form_elements))) {
if ($form_element->isRequired()) {
$is_required_fields_valid = $form_element->getId() === $title_field->getId() || $form_element->getId() === $description_field->getId();
}
}
return $is_required_fields_valid;
}
示例9: pushDefaultValueInSubmittedValues
private function pushDefaultValueInSubmittedValues(Tracker_FormElement_Field $field, array &$fields_data)
{
$fields_data[$field->getId()] = $field->getDefaultValue();
}
示例10: getFieldValue
private function getFieldValue($fields_data, Tracker_Artifact $artifact, Tracker_FormElement_Field $field)
{
$field_id = $field->getId();
if (isset($fields_data[$field_id])) {
return $fields_data[$field_id];
}
return $this->getFieldValueFromLastChangeset($artifact, $field);
}
示例11: isFieldUsedInConditions
/** @return bool */
public function isFieldUsedInConditions(Tracker_FormElement_Field $field)
{
return $this->dao->isFieldUsed($field->getId());
}
示例12: bypassPermissions
/**
* Get the value of bypass_permissions
*
* @param Tracker_FormElement_Field $field
*
* @return boolean
*/
public function bypassPermissions(Tracker_FormElement_Field $field)
{
return $this->getFieldId() == $field->getId() && $this->bypass_permissions;
}
示例13: isFieldSubmitted
/**
* @return bool
*/
protected function isFieldSubmitted(Tracker_FormElement_Field $field, array $fields_data)
{
return isset($fields_data[$field->getId()]);
}
示例14: setField
/**
* Set field
*
* @param Tracker_FormElement_Field $field Field
*/
public function setField(Tracker_FormElement_Field $field)
{
$this->field = $field;
$this->field_id = $field->getId();
}
示例15: 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;
}