private function removeElementFromCollection(array &$charts, GraphOnTrackersV5_Chart $edited_chart)
 {
     foreach ($charts as $key => $chart) {
         if ($chart->getId() === $edited_chart->getId()) {
             unset($charts[$key]);
         }
     }
 }
 public function exportToXml(SimpleXMLElement $root, $formsMapping)
 {
     parent::exportToXML($root, $formsMapping);
     if ($this->start_date) {
         $root->addAttribute('start_date', $this->start_date);
     }
     if ($this->duration) {
         $root->addAttribute('duration', $this->duration);
     }
     if ($this->remaining_field) {
         $root->addAttribute('remaining_field', array_search($this->remaining_field, $formsMapping));
     }
     if ($this->done_field) {
         $root->addAttribute('done_field', array_search($this->done_field, $formsMapping));
     }
 }
 public function report_is_created()
 {
     return $this->chart->getId() > 0;
 }
 public function exportToXml(SimpleXMLElement $root, $formsMapping)
 {
     parent::exportToXML($root, $formsMapping);
     if ($this->start_date) {
         $root->addAttribute('start_date', $this->start_date);
     }
     if ($this->stop_date) {
         $root->addAttribute('stop_date', $this->stop_date);
     }
     if ($this->scale) {
         $root->addAttribute('scale', $this->scale);
     }
     if ($this->field_id) {
         $root->addAttribute('effort_field', array_search($this->field_id, $formsMapping));
     }
 }
 public function exportToXml(SimpleXMLElement $root, $formsMapping)
 {
     parent::exportToXML($root, $formsMapping);
     if ($base = (string) array_search($this->field_base, $formsMapping)) {
         $root->addAttribute('base', $base);
     }
     if ($group = (string) array_search($this->field_group, $formsMapping)) {
         $root->addAttribute('group', $group);
     }
 }
 public function exportToXml(SimpleXMLElement $root, $formsMapping)
 {
     parent::exportToXML($root, $formsMapping);
     if ($this->scale) {
         $root->addAttribute('scale', $this->scale);
     }
     if ($this->as_of_date) {
         $root->addAttribute('as_of_date', $this->as_of_date);
     }
     if ($this->field_start && ($start = (string) array_search($this->field_start, $formsMapping))) {
         $root->addAttribute('start', $start);
     }
     if ($this->field_due && ($due = (string) array_search($this->field_due, $formsMapping))) {
         $root->addAttribute('due', $due);
     }
     if ($this->field_finish && ($finish = (string) array_search($this->field_finish, $formsMapping))) {
         $root->addAttribute('finish', $finish);
     }
     if ($this->field_percentage && ($percentage = (string) array_search($this->field_percentage, $formsMapping))) {
         $root->addAttribute('percentage', $percentage);
     }
     if ($this->field_righttext && ($righttext = (string) array_search($this->field_righttext, $formsMapping))) {
         $root->addAttribute('righttext', $righttext);
     }
     if ($this->summary) {
         if ($res = array_search($this->summary, $formsMapping)) {
             $root->addAttribute('summary', $res);
         }
     }
 }
 public function exportToXML($root, $formsMapping)
 {
     parent::exportToXML(&$root, $formsMapping);
     if ($mapping = (string) array_search($this->field_base, $formsMapping)) {
         $root->addAttribute('base', $mapping);
     }
 }
 public function exportToXML($root, $formsMapping)
 {
     parent::exportToXML(&$root, $formsMapping);
     if ($this->start_date) {
         $root->addAttribute('start_date', $this->start_date);
     }
     if ($this->duration) {
         $root->addAttribute('duration', $this->duration);
     }
     if ($this->field_id) {
         $root->addAttribute('effort_field', array_search($this->field_id, $formsMapping));
     }
 }