public function action_edit() { parent::action_edit(); if (!$this->execute) { return; } }
public function action_edit() { parent::action_edit(); if (!$this->execute) { return; } $this->view->pageHeader = 'Newsletter Signup №' . $this->view->item->id(); }
public function action_edit() { parent::action_edit(); if (!$this->execute) { return; } $this->view->pageHeader = 'Страница «' . htmlspecialchars(trim($this->view->item->title)) . '»'; }
public function action_edit() { parent::action_edit(); if (!$this->execute) { return; } $this->view->pageHeader = 'Шаблон №' . $this->view->item->id(); }
public function action_edit() { parent::action_edit(); /** @var \App\Model\Enquiry $enquiry */ $enquiry = $this->view->item; if ($enquiry->id()) { $this->view->enquiryMessages = $enquiry->messages->with('author')->find_all()->as_array(); $this->view->subview = 'enquiry/edit'; } }
public function action_edit() { parent::action_edit(); /** @var \App\Model\Order $order */ $order = $this->view->item; $this->view->order = $order; $this->view->orderItems = $order->orderItems->find_all()->as_array(); if ($order->id()) { $this->view->subview = 'order/edit'; } }
public function action_edit() { parent::action_edit(); if (!$this->execute) { return; } $subscriberIds = isset($this->view->item->subscriber_ids) ? $this->view->item->subscriber_ids : ''; $this->view->selectedSubscribers = preg_split('/\\s*,\\s*/', $subscriberIds, -1, PREG_SPLIT_NO_EMPTY); $this->view->subscribers = $this->getSubscribers(); $this->view->pageHeader = 'Письмо №' . $this->view->item->id(); }
public function action_edit() { parent::action_edit(); if (!$this->execute) { return; } /** @var \App\Model\Option $option */ $option = $this->view->item; if ($option->id()) { //$this->view->enquiryMessages = $option->messages->with('author')->find_all()->as_array(); $this->view->subview = 'option/edit'; $this->view->pageHeader = "Product Option «" . $option->name . "»"; } }
public function action_edit() { $oldStatus = null; $id = $this->request->param('id'); if ($this->request->method == 'POST') { $item = null; if ($id) { /** @var \App\Model\Order $item */ $item = $this->pixie->orm->get($this->model->model_name, $id); } if (!$item || !$item->loaded()) { throw new NotFoundException(); } $oldStatus = $item->status; } parent::action_edit(); /** @var \App\Model\Order $order */ $order = $this->pixie->orm->get($this->model->model_name, $id); if ($this->request->method == 'POST') { if ($oldStatus != $order->status) { $this->pixie->dispatcher->dispatch(Events::ORDER_STATUS_CHANGED, new OrderStatusChangedEvent($order, $order->status)); } } if (!$this->execute) { return; } $this->view->order = $order; $this->view->orderItems = $order->orderItems->find_all()->as_array(); if ($order->id()) { $paymentConfig = $this->pixie->config->get('payment'); $isTesting = !!$paymentConfig['testing']; $this->view->isTesting = $isTesting; if ($order->isRefundable() || $isTesting) { $payment = $order->payment; $canRefundOrder = !(!$order->isRefundable() && !$isTesting || !$payment || !$payment->loaded()); if ($canRefundOrder) { $canRefundPayment = $payment->isRefundable() || $isTesting; if ($canRefundPayment) { $operation = $payment->refund_operation; $this->pixie->payments->getRefundParameters($this->request, $this->view, $operation, $payment, $isTesting); } } } $this->view->subview = 'order/edit'; $this->view->pageTitle = $this->modelNameSingle . ' №' . $order->uid; $this->view->pageHeader = $this->view->pageTitle; } }