예제 #1
0
 public function fill($logentry)
 {
     parent::fill($logentry);
     $availableLevels = array_flip($this->availableLevels);
     $this->level = $availableLevels[$logentry->getLevel()];
     $timezone = $this->settingService->getValueOf("agit.timezone");
     $created = clone $logentry->getCreated();
     $created->setTimezone(new DateTimeZone($timezone));
     $this->created = $this->createObject("common.v1/DateTime", $created);
 }
예제 #2
0
 public function fill($order)
 {
     parent::fill($order);
     $this->price = 0;
     foreach ($order->getItems()->getValues() as $item) {
         foreach ($item->getPrices()->getValues() as $price) {
             $this->price += $price->getAmount();
         }
     }
 }