Exemple #1
0
 /**
  * Populates visible milestones inside the project
  *
  * @return void
  */
 protected function _populateVisibleMilestones()
 {
     if ($this->_visible_milestones === null) {
         $this->_visible_milestones = array();
         if ($res = tables\VisibleMilestones::getTable()->getAllByProjectID($this->getID())) {
             while ($row = $res->getNextRow()) {
                 try {
                     $milestone = new \thebuggenie\core\entities\Milestone($row->get(tables\Milestones::ID), $row);
                     if ($milestone->hasAccess()) {
                         $this->_visible_milestones[$milestone->getID()] = $milestone;
                     }
                 } catch (\Exception $e) {
                 }
             }
         }
     }
 }