/**
  * Create a new ValuesGroup and returns the object instance.
  *
  * After creating the group it can be expended with fields or subgroups:
  *
  * ->group()
  *     ->field('name')
  *         ->...
  *     ->end() // return back to the ValuesGroup.
  * ->end() // return back to the parent ValuesGroup
  *
  * @param string $logical eg. one of the following ValuesGroup class constants value:
  *                        GROUP_LOGICAL_OR or GROUP_LOGICAL_AND
  *
  * @return SearchConditionBuilder
  */
 public function group($logical = ValuesGroup::GROUP_LOGICAL_AND)
 {
     $builder = new self($logical, null, $this);
     $this->valuesGroup->addGroup($builder->getGroup());
     return $builder;
 }
Example #2
0
 /**
  * get the id of the group a ticket is forwarded to.
  * @param $ticket_id the id of the ticket.
  * @return the id of the group
  */
 public static function getSGroupOfTicket($ticket_id)
 {
     $forw = new self();
     $forw->load($ticket_id);
     return $forw->getGroup();
 }