/** * Outputs the object as plain text. * @param JOB $entry * @access private */ protected function _display_as_plain_text($entry) { echo $this->line('[Kind]: ' . $entry->kind_as_text()); $assignee = $entry->assignee(); if ($assignee) { $assignee_text = '[Assigned to]: ' . $assignee->title_as_plain_text(); $time_owned = $entry->assignee_age(); if (isset($time_owned)) { $assignee_text .= ' (' . $time_owned->format() . ')'; } echo $this->line($assignee_text); } else { echo $this->line('[Assigned to]: Nobody'); } $creator = $entry->creator(); $reporter = $entry->reporter(); if (!$reporter->equals($creator)) { echo $this->line('[Reported By]: ' . $reporter->title_as_plain_text()); } if ($entry->time_needed->is_valid()) { echo $this->line('[Needed by]: ' . $this->time($entry->time_needed, Date_time_format_short_date)); } $this->_echo_plain_text_user_information($entry); $this->_echo_branches_as_plain_text($entry); $this->_echo_plain_text_description($entry); $this->_echo_plain_text_extra_description($entry); }
/** * Record class-specific differences. * 'orig' is the same as {@link $_object}, but is passed here for convenience. * @param JOB $orig * @param JOB $new * @access private */ protected function _record_differences($orig, $new) { if ($orig->reporter_id != $new->reporter_id) { $this->_record_object_difference('Reporter', $orig->reporter(), $new->reporter()); } parent::_record_differences($orig, $new); $this->_record_time_difference('Time needed', $orig->time_needed, $new->time_needed); if ($orig->assignee_id != $new->assignee_id) { $this->_record_object_difference('Assignee', $orig->assignee(), $new->assignee()); } }