Esempio n. 1
0
 /**
  * Search Component router constructor
  *
  * @param   JApplicationCms  $app   The application object
  * @param   JMenu            $menu  The menu object to work with
  */
 public function __construct($app = null, $menu = null)
 {
     $params = JComponentHelper::getParams('com_contact');
     $this->noIDs = (bool) $params->get('sef_ids');
     $categories = new JComponentRouterViewconfiguration('categories');
     $categories->setKey('id');
     $this->registerView($categories);
     $category = new JComponentRouterViewconfiguration('category');
     $category->setKey('id')->setParent($categories, 'catid')->setNestable();
     $this->registerView($category);
     $contact = new JComponentRouterViewconfiguration('contact');
     $contact->setKey('id')->setParent($category, 'catid');
     $this->registerView($contact);
     $this->registerView(new JComponentRouterViewconfiguration('featured'));
     parent::__construct($app, $menu);
     $this->attachRule(new JComponentRouterRulesMenu($this));
     $params = JComponentHelper::getParams('com_content');
     if ($params->get('sef_advanced', 0)) {
         $this->attachRule(new JComponentRouterRulesStandard($this));
         $this->attachRule(new JComponentRouterRulesNomenu($this));
     } else {
         JLoader::register('ContactRouterRulesLegacy', __DIR__ . '/helpers/legacyrouter.php');
         $this->attachRule(new ContactRouterRulesLegacy($this));
     }
 }
Esempio n. 2
0
 /**
  * Users Component router constructor
  *
  * @param   JApplicationCms  $app   The application object
  * @param   JMenu            $menu  The menu object to work with
  */
 public function __construct($app = null, $menu = null)
 {
     $this->registerView(new JComponentRouterViewconfiguration('login'));
     $profile = new JComponentRouterViewconfiguration('profile');
     $profile->addLayout('edit');
     $this->registerView($profile);
     $this->registerView(new JComponentRouterViewconfiguration('registration'));
     $this->registerView(new JComponentRouterViewconfiguration('remind'));
     $this->registerView(new JComponentRouterViewconfiguration('reset'));
     parent::__construct($app, $menu);
     $this->attachRule(new JComponentRouterRulesMenu($this));
     $params = JComponentHelper::getParams('com_content');
     if ($params->get('sef_advanced', 0)) {
         $this->attachRule(new JComponentRouterRulesStandard($this));
         $this->attachRule(new JComponentRouterRulesNomenu($this));
     } else {
         JLoader::register('UsersRouterRulesLegacy', __DIR__ . '/helpers/legacyrouter.php');
         $this->attachRule(new UsersRouterRulesLegacy($this));
     }
 }