Exemplo n.º 1
0
 /**
  * Describe comment
  *
  * @param User $user
  * @return array
  */
 function describe($user, $additional = null)
 {
     if (is_array($additional)) {
         $additional['describe_attachments'] = true;
     } else {
         $additional = array('describe_attachments' => true);
     }
     // if
     return parent::describe($user, $additional);
 }
Exemplo n.º 2
0
 /**
  * Describe ticket
  *
  * @param User $user
  * @param array $additional
  * @return array
  */
 function describe($user, $additional = null)
 {
     $result = parent::describe($user, array('describe_project' => array_var($additional, 'describe_project'), 'describe_parent' => array_var($additional, 'describe_parent'), 'describe_milestone' => array_var($additional, 'describe_milestone'), 'describe_comments' => array_var($additional, 'describe_comments'), 'describe_tasks' => array_var($additional, 'describe_tasks'), 'describe_attachments' => array_var($additional, 'describe_attachments'), 'describe_assignees' => array_var($additional, 'describe_assignees')));
     $result['ticket_id'] = $this->getTicketId();
     return $result;
 }
 /**
  * Describe milestone
  *
  * @param User $user
  * @param array $additional
  * @return array
  */
 function describe($user, $additional = null)
 {
     $result = parent::describe($user, array('describe_project' => array_var($additional, 'describe_project'), 'describe_parent' => array_var($additional, 'describe_parent'), 'describe_milestone' => array_var($additional, 'describe_milestone'), 'describe_comments' => array_var($additional, 'describe_comments'), 'describe_tasks' => array_var($additional, 'describe_tasks'), 'describe_attachments' => array_var($additional, 'describe_attachments'), 'describe_assignees' => array_var($additional, 'describe_assignees')));
     unset($result['due_on']);
     unset($result['milestone_id']);
     $result['start_on'] = $this->getStartOn();
     $result['due_on'] = $this->getDueOn();
     return $result;
 }
Exemplo n.º 4
0
 /**
  * Describe page
  *
  * @param User $user
  * @param array $additional
  * @return array
  */
 function describe($user, $additional = null)
 {
     $result = parent::describe($user, array('describe_project' => array_var($additional, 'describe_project'), 'describe_parent' => array_var($additional, 'describe_parent'), 'describe_milestone' => array_var($additional, 'describe_milestone'), 'describe_comments' => array_var($additional, 'describe_comments'), 'describe_tasks' => array_var($additional, 'describe_tasks'), 'describe_attachments' => array_var($additional, 'describe_attachments')));
     $result['revision_num'] = $this->getRevisionNum();
     $result['is_archived'] = $this->getIsArchived();
     if (array_var($additional, 'describe_subpages')) {
         $result['subpages'] = array();
         $subpages = $this->getSubpages();
         if (is_foreachable($subpages)) {
             foreach ($subpages as $subpage) {
                 $result['subpages'][] = $subpage->describe($user);
             }
             // foreach
         }
         // if
     }
     // if
     if (array_var($additional, 'describe_revisions')) {
         $result['revisions'] = array();
         $revisions = $this->getVersions();
         if (is_foreachable($revisions)) {
             foreach ($revisions as $revision) {
                 $result['revisions'][] = $revision->describe($user);
             }
             // foreach
         }
         // if
     }
     // if
     return $result;
 }
 /**
  * Describe time record
  *
  * @param User $user
  * @param array $additional
  * @return array
  */
 function describe($user, $additional = null)
 {
     $result = parent::describe($user, array('describe_project' => array_var($additional, 'describe_project'), 'describe_parent' => array_var($additional, 'describe_parent'), 'describe_milestone' => array_var($additional, 'describe_milestone'), 'describe_comments' => array_var($additional, 'describe_comments'), 'describe_tasks' => array_var($additional, 'describe_tasks'), 'describe_attachments' => array_var($additional, 'describe_attachments')));
     $result['billable_status'] = $this->getBillableStatus();
     $result['value'] = $this->getValue();
     $result['record_date'] = $this->getRecordDate();
     // Fields kept for compatibility reasons. In activeCollab 1.1.5
     // is_billable and is_billed were replaced with billable_status flag and
     // are considerated deprecated
     $result['is_billable'] = $this->isBillable();
     $result['is_billed'] = $this->isBilled();
     $record_user = $this->getUser();
     if (instance_of($record_user, 'User')) {
         $result['user'] = $record_user->describe($user);
     } else {
         $result['user_id'] = $this->getUserId();
     }
     // if
     return $result;
 }
Exemplo n.º 6
0
 /**
  * Describe this file
  *
  * @param User $user
  * @param array $additional
  * @return array
  */
 function describe($user, $additional = null)
 {
     $result = parent::describe($user, array('describe_project' => array_var($additional, 'describe_project'), 'describe_parent' => array_var($additional, 'describe_parent'), 'describe_milestone' => array_var($additional, 'describe_milestone'), 'describe_comments' => array_var($additional, 'describe_comments'), 'describe_tasks' => array_var($additional, 'describe_tasks'), 'describe_attachments' => array_var($additional, 'describe_attachments')));
     if (array_var($additional, 'describe_revisions')) {
         $result['revisions'] = array();
         $revisions = $this->getRevisions();
         if (is_foreachable($revisions)) {
             foreach ($revisions as $revision) {
                 $result['revisions'][] = $revision->describe($user);
             }
             // foreach
         }
         // if
     }
     // if
     return $result;
 }