Esempio n. 1
0
 /**
  * @return string
  */
 function __toString()
 {
     if (!empty($this->Category)) {
         /** @var Category $Category */
         foreach ((array) $this->Category as $Category) {
             $this->Status->addPlan($Category->getStatus()->getPlan());
             $this->Status->addWork($Category->getStatus()->getWork());
             $this->Status->addDone($Category->getStatus()->getDone());
         }
     } else {
         if ($this->isDone === true) {
             $this->Status->addDone();
         } else {
             if ($this->isDone === false) {
                 $this->Status->addWork();
             } else {
                 $this->Status->addPlan();
             }
         }
     }
     switch ($this->Status->getState()) {
         case Status::STATE_PLAN:
             $this->isDone = null;
             break;
         case Status::STATE_WORK:
             $this->isDone = false;
             break;
         case Status::STATE_DONE:
             $this->isDone = true;
             break;
     }
     $Toggle = uniqid();
     $Content = new Title($this->isDone === true ? new Success(new TileBig() . ' Release: ' . $this->Version) : ($this->isDone === false ? new Danger(new TileBig() . ' Release: ' . $this->Version) : new Muted(new TileBig() . ' Release: ' . $this->Version)), $this->Description) . new Small($this->isDone === true ? '' : ($this->isDone === false ? new Danger(new CogWheels() . ' In Entwicklung ' . number_format($this->Status->getDonePercent(), 1, ',', '') . '%') : new Muted(new Disable() . ' In Planung ' . number_format($this->Status->getDonePercent(), 1, ',', '') . '%'))) . ($this->isDone === true ? '<button type="button" class="btn btn-default" data-toggle="collapse" data-target="#' . $Toggle . '">' . new Ok() . ' Entwicklung abgeschlossen' . '</button>' : $this->Status);
     return (string) new Layout(new LayoutGroup(array(new LayoutRow(array(new LayoutColumn(array(null === $this->isDone ? new Well($Content) : (false === $this->isDone ? new Info($Content) : new Warning($Content)))))), new LayoutRow(array(new LayoutColumn($this->isDone !== true ? new Well(implode($this->Category)) : '<span id="' . $Toggle . '" class="collapse">' . new Warning(implode($this->Category)) . '</span>'))))));
 }
Esempio n. 2
0
 /**
  * @return Status
  */
 public function getStatus()
 {
     if (empty($this->Duty)) {
         if ($this->isDone === true) {
             $this->Status->addDone();
         } else {
             if ($this->isDone === false) {
                 $this->Status->addWork();
             } else {
                 $this->Status->addPlan();
             }
         }
     }
     return $this->Status;
 }
Esempio n. 3
0
 /**
  * @return Status
  */
 public function getStatus()
 {
     $this->Status = new Status();
     if (!empty($this->Feature)) {
         /** @var Feature $Feature */
         foreach ((array) $this->Feature as $Feature) {
             $this->Status->addPlan($Feature->getStatus()->getPlan());
             $this->Status->addWork($Feature->getStatus()->getWork());
             $this->Status->addDone($Feature->getStatus()->getDone());
         }
     } else {
         if ($this->isDone === true) {
             $this->Status->addDone();
         } else {
             if ($this->isDone === false) {
                 $this->Status->addWork();
             } else {
                 $this->Status->addPlan();
             }
         }
     }
     return $this->Status;
 }