public static function diagnostics() { if (class_exists('\\Modules\\Factory')) { \Modules\Models\Conditions::register('\\Shop\\ModuleConditions\\Orders', array('title' => 'Orders', 'icon' => 'fa fa-shopping-cart', 'type' => 'shop', 'slug' => 'shop-orders')); } $settings = \Shop\Models\Settings::fetch(); // TODO When did we last pull down the currency list? if (empty($settings->currencies_last_refreshed) || $settings->currencies_last_refreshed < time() - 24 * 60) { /* \Dsc\Queue::task('\Shop\Models\Currencies::refresh', array(), array( 'title' => 'Refresh currencies from OpenExchangeRates.org' )); */ } // TODO When did we last pull down the exchange rates? if (empty($settings->exchangerates_last_refreshed) || $settings->exchangerates_last_refreshed < time() - 24 * 60) { } }
protected function preAdmin() { if (class_exists('\\Search\\Factory')) { \Search\Factory::registerSource(new \Search\Models\Source(array('id' => 'modules', 'title' => 'Modules', 'class' => '\\Modules\\Models\\Modules', 'priority' => 40))); } $path = $this->app->hive()['PATH']; if (strpos($path, '/admin/module/edit') !== false) { // Bootstrap the reports \Modules\Models\Conditions::bootstrap(); } $custom_nav_items = (new \Admin\Models\Navigation())->emptyState()->setState('filter.root', false)->setState('filter.published', true)->setState('order_clause', array('tree' => 1, 'lft' => 1))->setCondition('details.type', 'module-custom')->getList(); if ($custom_nav_items) { foreach ($custom_nav_items as $nav_item) { if ($position = $nav_item->{'details.module_position'}) { \Modules\Factory::registerPositions(array($position)); } } } }
/** * Runs before all global_apps * * @param unknown $app */ protected function preBase($app) { if (class_exists('\\Modules\\Factory')) { \Modules\Models\Conditions::register('\\Activity\\ModuleConditions\\Visits', array('title' => 'Visits', 'icon' => 'fa fa-bolt', 'type' => 'activity', 'slug' => 'activity-visits')); } }