本文整理汇总了PHP中Tracker::getId方法的典型用法代码示例。如果您正苦于以下问题:PHP Tracker::getId方法的具体用法?PHP Tracker::getId怎么用?PHP Tracker::getId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tracker
的用法示例。
在下文中一共展示了Tracker::getId方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fetchCriteria
public function fetchCriteria(Tracker_Report_Criteria $criteria)
{
$trackerId = $this->tracker->getId();
$html = '';
$html .= '<label for="' . $this->id . '_' . $trackerId . '" title="#' . $trackerId . '">' . $this->tracker->getName() . '</label>';
$html .= <<<MARKUP
<div class="tracker_report_criteria">
<input type="hidden" name="artifact_criteria[{$trackerId}]">
<select id="tracker_report_criteria_adv_{$trackerId}" multiple="multiple" size="7" name="artifact_criteria[{$trackerId}][]">
MARKUP;
$anySelected = ' selected="selected"';
$options = '';
// <option value="100">None</option>
foreach ($this->artifacts as $artifact) {
$artifactId = $artifact->getId();
if ($artifact->isSelected) {
$anySelected = '';
$selected = ' selected="selected"';
} else {
$selected = '';
}
$options .= '<option' . $selected . ' value="' . $artifactId . '">' . $artifact->getTitle() . '</option>';
}
$html .= '<option' . $anySelected . ' value="">Any</option>';
$html .= $options;
$html .= <<<MARKUP
</select>
</input>
</div>
MARKUP;
/*
<option style="" value="571">New</option>
*/
return $html;
}
示例2: updateArtifacts
public function updateArtifacts(PFUser $user, Codendi_Request $request)
{
if ($this->tracker->userIsAdmin($user)) {
$masschange_aids = $request->get('masschange_aids');
if (empty($masschange_aids)) {
$GLOBALS['Response']->addFeedback('error', $GLOBALS['Language']->getText('plugin_tracker_masschange_detail', 'no_items_selected'));
$GLOBALS['Response']->redirect(TRACKER_BASE_URL . '/?tracker=' . $this->tracker->getId());
}
$unsubscribe = $request->get('masschange-unsubscribe-option');
if ($unsubscribe) {
$this->unsubscribeUserFromEachArtifactNotification($user, $request, $masschange_aids);
}
$send_notifications = $this->getSendNotificationsFromRequest($request);
$masschange_data = $request->get('artifact');
if (!$unsubscribe && empty($masschange_data)) {
$GLOBALS['Response']->addFeedback('error', $GLOBALS['Language']->getText('plugin_tracker_masschange_detail', 'no_items_selected'));
$GLOBALS['Response']->redirect(TRACKER_BASE_URL . '/?tracker=' . $this->tracker->getId());
}
$comment = $request->get('artifact_masschange_followup_comment');
$masschange_values_extractor = new Tracker_MasschangeDataValueExtractor();
$new_fields_data = $masschange_values_extractor->getNewValues($masschange_data);
if (count($new_fields_data) > 0 || $comment !== '') {
$comment_format = $request->get('comment_formatmass_change');
$this->tracker->updateArtifactsMasschange($user, $masschange_aids, $new_fields_data, $comment, $send_notifications, $comment_format);
}
$GLOBALS['Response']->redirect(TRACKER_BASE_URL . '/?tracker=' . $this->tracker->getId());
} else {
$GLOBALS['Response']->addFeedback('error', $GLOBALS['Language']->getText('plugin_tracker_admin', 'access_denied'));
$GLOBALS['Response']->redirect(TRACKER_BASE_URL . '/?tracker=' . $this->tracker_report->getId());
}
}
示例3: getFieldsData
/**
* @return array
*/
public function getFieldsData(SimpleXMLElement $xml_field_change)
{
$data = array();
if (!$xml_field_change->field_change) {
return $data;
}
foreach ($xml_field_change->field_change as $field_change) {
$field = $this->formelement_factory->getUsedFieldByName($this->tracker->getId(), (string) $field_change['field_name']);
if ($field) {
$this->appendValidValue($data, $field, $field_change);
} else {
$this->logger->debug("Skipped unknown/unused field " . (string) $field_change['field_name']);
}
}
return $data;
}
示例4: getMappings
/**
* Get all mappings defined for the cardwall on top of a tracker
*
* @param Tracker $tracker The tracker
* @param array $columns array of Cardwall_Column
*
* @return array of Cardwall_OnTop_Config_TrackerMapping
*/
public function getMappings(Tracker $tracker, Cardwall_OnTop_Config_ColumnCollection $columns)
{
$mappings = array();
foreach ($this->dao->searchMappingFields($tracker->getId()) as $row) {
$this->instantiateMappingFromRow($tracker, $mappings, $row, $columns);
}
return $mappings;
}
示例5: __construct
public function __construct(Tracker $tracker, array $stored_ugroups_permissions, PermissionsManager $permissions_manager)
{
$this->group_id = $tracker->getGroupId();
$this->atid = $tracker->getId();
$this->tracker = $tracker;
$this->stored_ugroups_permissions = $stored_ugroups_permissions;
$this->permissions_manager = $permissions_manager;
}
示例6: getFieldByName
private function getFieldByName(Tracker $tracker, $field_name)
{
$field = $this->formelement_factory->getUsedFieldByName($tracker->getId(), $field_name);
if (!$field) {
throw new Tracker_FormElement_InvalidFieldException("Field {$field_name} does not exist in the tracker");
}
return $field;
}
示例7: getColumnsFromDao
/**
* @return Cardwall_OnTop_Config_ColumnCollection
*/
private function getColumnsFromDao(Tracker $tracker)
{
$columns = new Cardwall_OnTop_Config_ColumnFreestyleCollection();
foreach ($this->dao->searchColumnsByTrackerId($tracker->getId()) as $row) {
list($bgcolor, $fgcolor) = $this->getColumnColorsFromRow($row);
$columns[] = new Cardwall_Column($row['id'], $row['label'], $bgcolor, $fgcolor);
}
return $columns;
}
示例8: getChildren
/**
* @return array of Tracker
*/
public function getChildren(Tracker $tracker)
{
$dar = $this->dao->getChildren($tracker->getId());
$children = array();
foreach ($dar as $row) {
$children[] = $this->tracker_factory->getTrackerById($row['child_id']);
}
return $children;
}
示例9: getListOfInvolvedStaticUgroups
/**
* @return ProjectUGroup[]
*/
public function getListOfInvolvedStaticUgroups(Tracker $template_tracker)
{
$project = $template_tracker->getProject();
$ugroups = array();
foreach ($this->permissions_dao->getAuthorizedStaticUgroupIds($template_tracker->getId()) as $id) {
$ugroups[] = $this->ugroup_manager->getUGroup($project, $id);
}
return $ugroups;
}
示例10: getTrackerMapping
public function getTrackerMapping(Tracker $tracker)
{
$tracker_id = $tracker->getId();
$mapping_data = array($tracker_id => array('properties' => array('id' => array('type' => 'integer'), 'group_id' => array('type' => 'integer'), 'tracker_id' => array('type' => 'integer'), 'last_changeset_id' => array('type' => 'integer'), ElasticSearch_1_2_ArtifactPropertiesExtractor::LAST_UPDATE_PROPERTY => array('type' => 'date', 'format' => 'date_time_no_millis'), 'followup_comments' => array('properties' => array('user_id' => array('type' => 'integer'), 'date_added' => array('type' => 'date', 'format' => 'date_time_no_millis'), 'comment' => array('type' => 'string'))))));
$this->addStandardTrackerPermissionsMetadata($mapping_data[$tracker_id]['properties']);
$this->addStandardArtifactPermissionsMetadata($mapping_data[$tracker_id]['properties']);
$this->artifact_properties_extractor->extractTrackerFields($tracker, $mapping_data);
return $mapping_data;
}
示例11: export
public function export(Tracker $tracker, SimpleXMLElement $xml_content, PFUser $user, ZipArchive $archive)
{
$artifacts_node = $xml_content->addChild('artifacts');
$all_artifacts = $this->artifact_factory->getArtifactsByTrackerId($tracker->getId());
$this->checkThreshold(count($all_artifacts));
foreach ($all_artifacts as $artifact) {
$artifact->exportToXML($artifacts_node, $user, $archive);
}
$this->rng_validator->validate($artifacts_node, realpath(dirname(TRACKER_BASE_DIR) . self::ARTIFACTS_RNG_PATH));
}
示例12: getMatchingIdsForTopBacklog
private function getMatchingIdsForTopBacklog(Planning_VirtualTopMilestone $milestone, Tracker $backlog_tracker, PFUser $user)
{
$strategy_unassigned = $this->strategy_factory->getSelfBacklogStrategy($milestone);
$backlog_items = $this->backlog_item_collection_factory->getUnassignedOpenCollection($user, $milestone, $strategy_unassigned, false);
foreach ($backlog_items as $backlog_item) {
if ($backlog_item->getArtifact()->getTrackerId() == $backlog_tracker->getId()) {
$this->backlog_ids[$backlog_item->getArtifact()->getId()] = true;
}
}
return $this->backlog_ids;
}
示例13: checkPermissionValidity
private function checkPermissionValidity(Tracker_Permission_PermissionRequest $request, Tracker $tracker)
{
if ($request->containsPermissionType(Tracker_Permission_Command::PERMISSION_ASSIGNEE) != null && $tracker->getContributorField() === null) {
$GLOBALS['Response']->addFeedback(Feedback::ERROR, $GLOBALS['Language']->getText('plugin_tracker_admin_permissions', 'no_assignee_semantic', array(TRACKER_BASE_URL . '/?' . http_build_query(array('func' => 'admin-semantic', 'tracker' => $tracker->getId())), $GLOBALS['Language']->getText('plugin_tracker_admin_semantic', 'contributor_label'))), CODENDI_PURIFIER_DISABLED);
return false;
}
if ($request->getPermissionType(ProjectUGroup::PROJECT_ADMIN)) {
return false;
}
return true;
}
示例14: getParentTrackersAndStopAtGivenTracker
private function getParentTrackersAndStopAtGivenTracker(Tracker $tracker, Tracker $stop)
{
$hierarchy = array();
while (($parent = $this->hierarchy_factory->getParent($tracker)) && $parent != $stop) {
$hierarchy[$parent->getId()] = $tracker;
$tracker = $parent;
}
if ($parent == $stop) {
$hierarchy[$stop->getId()] = $tracker;
return $hierarchy;
}
}
示例15: getPossibleArtifactParents
public function getPossibleArtifactParents(Tracker $parent_tracker, PFUser $user, $limit, $offset)
{
$label = '';
$possible_parents = array();
$display_selector = true;
EventManager::instance()->processEvent(TRACKER_EVENT_ARTIFACT_PARENTS_SELECTOR, array('user' => $user, 'parent_tracker' => $parent_tracker, 'possible_parents' => &$possible_parents, 'label' => &$label, 'display_selector' => &$display_selector));
if (!$possible_parents) {
$label = $GLOBALS['Language']->getText('plugin_tracker_artifact', 'formelement_artifactlink_open_parent', array($parent_tracker->getName()));
$possible_parents = $this->artifact_factory->getPaginatedPossibleParentArtifactsUserCanView($user, $parent_tracker->getId(), $limit, $offset);
}
return array($label, $possible_parents, $display_selector);
}