예제 #1
0
 /**
  * @param UserEntity $studentInstance
  * @return StudentResult[]
  */
 public static function getFilteredList($studentInstance)
 {
     $i = 1;
     $studentResults = array();
     $studentID = $studentInstance->getProperty(Student::PROP_ID)->getValue();
     $selectQuery = new StudentResultQuery($studentID);
     $resultList = $selectQuery->exec();
     while (($params = $resultList->fetch_assoc()) !== NULL) {
         $params[self::PROP_ORDINAL_NUMBER] = $i;
         $studentResult = new StudentResult($params);
         array_push($studentResults, $studentResult);
         $i++;
     }
     return $studentResults;
 }
예제 #2
0
 /**
  * @param array $params
  */
 function __construct($params)
 {
     parent::__construct($params);
     $this->label = self::LABEL;
     $this->properties[self::PROP_FIRST_NAME] = new StringProperty(self::PROP_FIRST_NAME, 'Emri', $params[self::PROP_FIRST_NAME], true, true);
     $this->properties[self::PROP_LAST_NAME] = new StringProperty(self::PROP_LAST_NAME, 'Mbiemri', $params[self::PROP_LAST_NAME], true, true);
     $this->properties[self::PROP_SC_DEGREE] = new StringProperty(self::PROP_SC_DEGREE, 'Titull', $params[self::PROP_SC_DEGREE], true, true);
     $this->actionHelper = new EntityActionHelper(self::TABLE_NAME, $this);
 }
예제 #3
0
 /**
  * @param array $params
  * @param bool $isPartOfList [optional]
  */
 function __construct($params, $isPartOfList = false)
 {
     parent::__construct($params);
     $this->label = self::LABEL;
     $this->properties[self::PROP_FIRST_NAME] = new StringProperty(self::PROP_FIRST_NAME, 'Emri', $params[self::PROP_FIRST_NAME], true, true);
     $this->properties[self::PROP_LAST_NAME] = new StringProperty(self::PROP_LAST_NAME, 'Mbiemri', $params[self::PROP_LAST_NAME], true, true);
     $this->properties[self::PROP_GROUP_ID] = new EntityProperty(self::PROP_GROUP_ID, 'Grupi', intval($params[self::PROP_GROUP_ID]), Group::getBuilder()->getList($isPartOfList), true);
     $this->actionHelper = new EntityActionHelper(self::TABLE_NAME, $this);
     $this->isPartOfList = $isPartOfList;
 }