public function render()
 {
     $template = $this->getTemplate();
     $template->setFile(__DIR__ . '/templates/template.latte');
     $template->defaultWorkedHours = $this->itemUpdateFormFactory->getDefaultTimeValue('workedHours');
     $template->form = $this['listingMassItemsChangeForm'];
     $template->render();
 }
 public function render()
 {
     $template = $this->getTemplate();
     $template->setFile(__DIR__ . '/templates/template.latte');
     if (!isset($this->itemsCollection)) {
         $this->itemsCollection = $this->listing->listingItems;
     }
     $this['itemsTable']->setListingItems($this->itemsCollection);
     $template->defaultWorkedHours = $this->itemUpdateFormFactory->getDefaultTimeValue('workedHours');
     $template->form = $this['listingMassItemsChangeForm'];
     $template->render();
 }
 public function render()
 {
     $template = $this->getTemplate();
     $template->setFile(__DIR__ . '/template.latte');
     $template->listing = $this->listing;
     $date = $this->prepareDateTime($this->listing, $this->day);
     if ($this->day === null or $date === false) {
         $template->setFile(__DIR__ . '/wrongDay.latte');
         $template->render();
         return;
     }
     $template->itemDate = $date;
     if ($this->listingItem === null) {
         $this->listingItem = $this->itemsFacade->getByDay($this->day, $this->listing);
     }
     $template->_form = $this['itemForm'];
     $workedHours = null;
     if ($this->listingItem instanceof ListingItem) {
         $workedHours = $this->listingItem->workedHours->getHours();
     }
     $template->workedHours = new \InvoiceTime(isset($workedHours) ? $workedHours : $this->itemUpdateFormFactory->getDefaultTimeValue('workedHours'));
     $template->render();
 }
Example #4
0
 /**
  * @Actions edit
  */
 protected function createComponentItemForm()
 {
     $form = $this->itemUpdateFormFactory->create();
     $form->onSuccess[] = [$this, 'processSaveItem'];
     return $form;
 }