/**
  * @param array $params
  * @param bool $isPartOfList
  */
 function __construct($params, $isPartOfList = false)
 {
     $this->label = self::LABEL;
     $this->id = array(self::PROP_ID => $params[self::PROP_ID]);
     $this->properties[self::PROP_ID] = new IntegerProperty(self::PROP_ID, 'ID', $this->id[self::PROP_ID], false, false);
     $this->properties[self::PROP_NAME] = new StringProperty(self::PROP_NAME, 'Emri', $params[self::PROP_NAME], true, true);
     $this->properties[self::PROP_FACULTY_ID] = new EntityProperty(self::PROP_FACULTY_ID, 'Fakulteti', intval($params[self::PROP_FACULTY_ID]), Faculty::getBuilder()->getList($isPartOfList), true);
     $this->actionHelper = new EntityActionHelper(self::TABLE_NAME, $this);
     $this->isPartOfList = $isPartOfList;
 }
Exemple #2
0
<?php

/**
 * Created by PhpStorm.
 * User: Marin Kaçaj
 * Date: 6/8/2015
 * Time: 6:14 PM
 */
use fti\adv_db\entity\Faculty;
require_once dirname(dirname(__FILE__)) . '/includes/loader.php';
require_once dirname(dirname(__FILE__)) . '/pages/createHelper.php';
redirectIfNotSecretary();
$entityBuilder = Faculty::getBuilder();
buildCreateView($entityBuilder);
require_once dirname(dirname(__FILE__)) . '/pages/formPage.php';