Exemplo n.º 1
0
 /**
  * Obtain the history of the Sim life cycle
  *
  * @param  \Application\Model\SimModel $sim
  * @param  \App_ListFilter             $filterList
  * @return array
  */
 public function historyLifeCycle(SimModel $sim, \App_ListFilter $filterList)
 {
     $from = $filterList->getOneFilterValueByFieldName(StatusHistoryFilterFields::START_DATE);
     $until = $filterList->getOneFilterValueByFieldName(StatusHistoryFilterFields::END_DATE);
     if (NULL !== $from) {
         $date = new \DateTime($from, new \DateTimeZone('GMT'));
         $from = $date->format('Y-m-d');
     }
     if (NULL !== $until) {
         $date = new \DateTime($until, new \DateTimeZone('GMT'));
         $until = $date->format('Y-m-d');
     }
     $data = $this->getMapper()->getLifeCycleHistory($sim, $from, $until);
     return $data;
 }