/** * @desc Builds an alert from its whole parameters. * @param int $id Identifier of the alert. * @param string $entitled Entitled of the alert. * @param string $properties Properties of the alert. * @param string $fixing_url Fixing url. * @param int $current_status Alert status. * @param Date $creation_date Alert creation date? * @param int $id_in_module Id in module field. * @param string $identifier Identifier of the alert. * @param string $type Type of the alert. * @param int $priority Priority of the alert. */ public function build($id, $entitled, $properties, $fixing_url, $current_status, $creation_date, $id_in_module, $identifier, $type, $priority) { parent::build_event($id, $entitled, $fixing_url, $current_status, $creation_date, $id_in_module, $identifier, $type); $this->set_priority($priority); $this->set_properties($properties); }
/** * @desc Builds a contribution object from its whole parameters. * @param int $id Contribution id. * @param string $entitled Contribution entitled. * @param string $fixing_url URL associated to the event. * @param string $module Module identifier at which the contribution is attached. * @param int status Contribution status. * @param Date $creation_date Contribution creation date. * @param Date $fixing_date Contribution fixing date. * @param mixed[] $auth Auth array determining the people who can treat the contribution. * @param int $poster_id Contribution creator id. * @param int $fixer_id Contribution fixer id. * @param int $id_in_module Id of the element associated to the contribution. * @param string $identifier Contribution identifier. * @param string $type Contribution type. * @param string $poster_login Login of the poster of the contribution. * @param string $fixer_login Login of the fixer of the contribution. */ public function build($id, $entitled, $description, $fixing_url, $module, $status, $creation_date, $fixing_date, $auth, $poster_id, $fixer_id, $id_in_module, $identifier, $type, $poster_login = '', $fixer_login = '', $poster_level = '', $fixer_level = '', $poster_groups = '', $fixer_groups = '') { //Building parent class parent::build_event($id, $entitled, $fixing_url, $status, $creation_date, $id_in_module, $identifier, $type); //Setting its whole parameters $this->description = $description; $this->module = $module; $this->fixing_date = $fixing_date; $this->auth = $auth; $this->poster_id = $poster_id; $this->fixer_id = $fixer_id; $this->poster_login = $poster_login; $this->fixer_login = $fixer_login; $this->poster_level = $poster_level; $this->fixer_level = $fixer_level; $this->poster_groups = $poster_groups; $this->fixer_groups = $fixer_groups; //Setting the modification flag to false, it just comes to be loaded $this->must_regenerate_cache = false; }