Example #1
0
 /**
  * Template function: display assignee of item
  *
  * @param string
  * @param string
  * @param string Output format, see {@link format_to_output()}
  */
 function assigned_to($before = '', $after = '', $format = 'htmlbody')
 {
     if ($this->get_assigned_User()) {
         echo $before;
         $this->assigned_User->preferred_name($format);
         echo $after;
     }
 }
Example #2
0
 /**
  * Get the comment author's name.
  *
  * @return string
  */
 function get_author_name()
 {
     if ($this->get_author_User()) {
         return $this->author_User->preferred_name('raw', false);
     } else {
         return $this->author;
     }
 }