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); }
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(); } } }