Example #1
0
 function __construct($id)
 {
     parent::__construct($id);
     $this->title = "{$this->person->fullname} » Edit";
 }
Example #2
0
 protected static function detail()
 {
     $p_where = array();
     $p_where['userID'] = W2HttpRequest::getRequestInt('userid', null, false, false);
     if ($p_where['userID'] > 0) {
         $tmpModel = PersonHandler::loadModelByUserID($p_where['userID']);
     }
     $p_countThis = null;
     $tmpResult = static::loadList($p_where, $p_order = 'id', $p_pageIndex = 1, $p_pageSize = 1, $p_countThis, $isDetail = true);
     if (is_array($tmpResult) && array_key_exists('errorCode', $tmpResult)) {
         return $tmpResult;
     }
     return Utility::getArrayForResults(RUNTIME_CODE_OK, '', $tmpResult);
 }
Example #3
0
 public function localGenreModel()
 {
     switch ($this->getGenre()) {
         case USER_GENRE::STUDENT:
             return StudentHandler::loadModelByUserID($this->getId());
             break;
         case USER_GENRE::PERSON:
             return PersonHandler::loadModelByUserID($this->getId());
             break;
         case USER_GENRE::COMPANY:
             return CompanyHandler::loadModelByUserID($this->getId());
             break;
         default:
             # code...
             break;
     }
     return null;
 }