protected function execute() { if ($this->state->get('paging', false)) { $limit = $this->state->get('limit'); $filters = $this->state->get('filters'); $count = $this->state->get('count', false); $appState = new Joomla\Registry\Registry(['limit' => $limit, 'count' => $count, 'filters' => $filters]); /** @var Sp4kAppsInvoiceApp $registrationApp */ $app = Sp4kAppsInvoiceApp::getInstance($appState); $appCollection = $app->getCollection(); $this->count = $appCollection->count; $this->items = $appCollection->items; } else { $this->items = Sp4kAppsInvoiceApp::getInstance(new Joomla\Registry\Registry($this->state->toObject()))->getItems(); } }
private function createInvoice() { $invoiceData = new Registry(['order_id' => $this->order->id, 'total' => $this->order->total]); $this->invoice = Sp4kAppsInvoiceApp::getInstance($invoiceData)->getItem()->update(); }
public function execute() { $this->item = Sp4kAppsInvoiceApp::getInsance(new Joomla\Registry\Registry($this->state->toObject()))->getItem(); }