/**
  * Prepare security- and filter-based restrictions.
  * @access private
  */
 protected function _prepare_restrictions()
 {
     parent::_prepare_restrictions();
     $this->_calculated_restrictions[] = "etob.branch_id = {$this->_branch->id}";
 }
 /**
  * Perform any setup needed on each returned object.
  * Redirect branch information onto default branch information. When an entry
  * is displayed in a project, it uses cached information relating to its
  * 'main' branch.
  * @param PROJECT_ENTRY $obj
  * @access private
  */
 protected function _prepare_object($obj)
 {
     parent::_prepare_object($obj);
     $branch_info = $obj->main_branch_info();
     $branch_info->release_id = $this->db->f('release_id');
     switch ($obj->type) {
         case 'job':
             $branch_info->status = $this->db->f('status');
             $branch_info->priority = $this->db->f('priority');
             $branch_info->time_closed->set_from_iso($this->db->f('time_closed'));
             $branch_info->closer_id = $this->db->f('closer_id');
             $branch_info->time_status_changed->set_from_iso($this->db->f('time_status_changed'));
             break;
         case 'change':
             $branch_info->applier_id = $this->db->f('applier_id');
             $branch_info->time_applied->set_from_iso($this->db->f('time_applied'));
             break;
     }
 }