예제 #1
0
 /**
  * Get or create current PC/Phone station.
  * @return string
  */
 function getCurrentStation($station_id = NULL, $type_id = 10)
 {
     $retval = StationFactory::getOrCreateStation($station_id, $this->getCurrentCompanyObject()->getID(), $type_id);
     if (is_object($retval) and isset($retval->Validator) and $retval->Validator->isValid() == FALSE) {
         return $this->returnHandler(FALSE, 'VALIDATION', TTi18n::getText('INVALID DATA'), $retval->Validator->getErrorsArray(), array('total_records' => 1, 'valid_records' => 0));
     } else {
         Debug::text('Returning Station ID: ' . $station_id, __FILE__, __LINE__, __METHOD__, 10);
         return $this->returnHandler($retval);
     }
 }