Example #1
0
 /**
  * Sets salutation of the user.
  *
  * @see kyUser::SALUTATION constants.
  *
  * @param string $salutation User salutation.
  * @return kyUser
  */
 public function setSalutation($salutation)
 {
     $this->salutation = ky_assure_constant($salutation, $this, 'SALUTATION');
     return $this;
 }
 /**
  * Sets the creation type for this ticket.
  *
  * @see kyTicket::CREATION_TYPE constants.
  *
  * @param int $creation_type Creation type.
  * @return kyTicket
  */
 public function setCreationType($creation_type)
 {
     $this->creation_type = ky_assure_constant($creation_type, $this, 'CREATION_TYPE');
     return $this;
 }
 /**
  * Sets module the department will be associated with.
  *
  * @see kyDepartment::MODULE constants.
  *
  * @param string $module Module the department will be associated with.
  * @return kyDepartment
  */
 public function setModule($module)
 {
     $this->module = ky_assure_constant($module, $this, 'MODULE');
     return $this;
 }
 /**
  * Sets status of the news item.
  *
  * @see kyNewsItem::STATUS constants.
  *
  * @param int $status Status of the news item.
  * @return kyNewsItem
  */
 public function setStatus($status)
 {
     $this->status = ky_assure_constant($status, $this, 'STATUS');
     return $this;
 }
 /**
  * Sets creator type of the comment.
  *
  * Automatically resets creator fullname to null when set to Staff.
  *
  * @see kyCommentBase::CREATOR_TYPE constants.
  *
  * @param int $creator_type Creator type of the comment.
  * @return $this
  */
 public function setCreatorType($creator_type)
 {
     $this->creator_type = ky_assure_constant($creator_type, $this, 'CREATOR_TYPE');
     switch ($this->creator_type) {
         case self::CREATOR_TYPE_STAFF:
             $this->creator_fullname = null;
             $this->creator_user = null;
             break;
         case self::CREATOR_TYPE_USER:
             $this->creator_staff = null;
             break;
     }
     return $this;
 }
 /**
  * Sets color of the time track.
  *
  * @see kyTicketTimeTrack::COLOR constants.
  *
  * @param int $note_color Color of the time track - one of kyTicketTimeTrack::COLOR_* constants.
  * @return kyTicketTimeTrack
  */
 public function setNoteColor($note_color)
 {
     $this->note_color = ky_assure_constant($note_color, $this, 'COLOR');
     return $this;
 }
 /**
  * Sets visibility type of the news category.
  *
  * @see kyNewsCategory::VISIBILITY_TYPE constants.
  *
  * @param int $visibility_type Visibility type of the news category.
  * @return kyNewsCategory
  */
 public function setVisibilityType($visibility_type)
 {
     $this->visibility_type = ky_assure_constant($visibility_type, $this, 'VISIBILITY_TYPE');
     return $this;
 }
 /**
  * Sets type of the user group.
  *
  * @see kyUserGroup::TYPE constants.
  *
  * @param string $type Type of the user group.
  * @return kyUserGroup
  */
 public function setType($type)
 {
     $this->type = ky_assure_constant($type, $this, 'TYPE');
     return $this;
 }
 /**
  * Sets category type of the knowledgebase category.
  *
  * @see kyKnowledgebaseCategory::CATEGORY_TYPE constants.
  *
  * @param int $category_type Category type of the knowledgebase category.
  * @return kyKnowledgebaseCategory
  */
 public function setCategoryType($category_type)
 {
     $this->category_type = ky_assure_constant($category_type, $this, 'CATEGORY_TYPE');
     return $this;
 }