Esempio n. 1
0
 protected function preAdmin()
 {
     if (class_exists('\\Modules\\Factory')) {
         \Modules\Factory::registerPositions(array('blog-tag-cloud'));
     }
     if (class_exists('\\Search\\Factory')) {
         \Search\Factory::registerSource(new \Search\Models\Source(array('id' => 'blog.posts', 'title' => 'Blog Posts', 'class' => '\\Blog\\Models\\Posts')));
     }
 }
Esempio n. 2
0
 protected function runAdmin()
 {
     $f3 = \Base::instance();
     if (!is_dir($f3->get('PATH_ROOT') . 'public/AdminTheme')) {
         $publictheme = $f3->get('PATH_ROOT') . 'public/AdminTheme';
         $admintheme = $f3->get('PATH_ROOT') . 'vendor/dioscouri/f3-admin/AdminTheme';
         $res = symlink($admintheme, $publictheme);
     }
     \Dsc\System::instance()->get('theme')->setTheme('AdminTheme', $this->dir . '/src/Admin/Theme/');
     if (class_exists('\\Modules\\Factory')) {
         \Modules\Factory::registerPositions(array('admin-dashboard'));
     }
     if (class_exists('\\Search\\Factory')) {
         \Search\Factory::registerSource(new \Search\Models\Source(array('id' => 'navigation', 'title' => 'Navigation Items', 'class' => '\\Admin\\Models\\Navigation', 'priority' => 40)));
     }
     parent::runAdmin();
 }
Esempio n. 3
0
 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));
             }
         }
     }
 }
Esempio n. 4
0
 protected function preAdmin()
 {
     parent::preAdmin();
     \Modules\Factory::registerPositions(array('left-invite-friend', 'right-invite-friend', 'above-invite-friend', 'below-invite-friend', 'above-affiliate-dashboard', 'right-affiliate-dashboard'));
     \Dsc\System::instance()->getDispatcher()->addListener(\Affiliates\Listeners\Shop::instance());
 }