/** * Get admin dash specific aux values * @param array $result current result array * @return array API result array */ public function getAdminConfig($result) { $result['data'] = new stdClass(); $WposConfig = new WposAdminSettings(); // Get general & global pos configuration $settings = $WposConfig->getAllSettings(); if ($settings === false) { $result['error'] = "Global config could not be retrieved!"; } $result['data']->general = $settings['general']; $result['data']->pos = $settings['pos']; $result['data']->invoice = $settings['invoice']; // get devices and locations if (($result['data']->devices = $this->getDevices()) === false || ($result['data']->locations = $this->getLocations()) === false) { $result['error'] = "Device or Location info could not be retrieved!"; } // get users if (($result['data']->users = $this->getUsers()) === false) { $result['error'] = "User info could not be retrieved!"; } // get tax if (($result['data']->tax = $this->getTaxRecords()) === false) { $result['error'] = "Tax config could not be retrieved!"; } return $result; }