Ejemplo n.º 1
0
 /**
  * Will tie the current module with the administration module;
  *
  * This method will invoke the proper administration methods used to tie the current module with the administrator interface,
  * mainly, adding the proper links to the main menu and sub-menu. The necessary information is taken from the configuration
  * file, while the names of the links are taken from constants defined in the current module;
  *
  * @param IFaceAdministration $objAdministrationMech The administration mechanism to tie to;
  * @return void Doesn't need to return anything;
  */
 public function tieInWithAdministration(IFaceAdministration $objAdministrationMech)
 {
     // Do a CALL to the parent;
     parent::tieInWithAdministration($objAdministrationMech);
     // Do the administration menu;
     $objWP = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('articles_file_dashboard')));
     self::$objAdministration->setMenuLink(new S(ARTICLES_MENU), $objWP, $this->getHELP(new S(ARTICLES_MANAGE_ARTICLES)));
     // Set ACLs;
     $objACL = new A();
     $objACL[] = new S('Articles.Articles.Do.View');
     $objACL[] = new S('Articles.Categories.Do.View');
     $objACL[] = new S('Articles.Comments.Do.View');
     $objACL[] = new S('Articles.Do.Operations');
     $objACL[] = new S('Articles.Do.Configuration');
     // ONLY: Articles.Articles.Do.View
     if ($this->ATH->checkCurrentUserZoneACL($objACL[0])->toBoolean() == TRUE) {
         $objMA = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('articles_file_manage_articles')));
         self::$objAdministration->setSubMLink(new S(ARTICLES_MANAGE_ARTICLES), $objMA, $this->getHELP(new S(ARTICLES_MANAGE_ARTICLES)));
     }
     // ONLY: Articles.Categories.Do.View
     if ($this->ATH->checkCurrentUserZoneACL($objACL[1])->toBoolean() == TRUE) {
         $objMC = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('articles_file_manage_categories')));
         self::$objAdministration->setSubMLink(new S(ARTICLES_MANAGE_CATEGORIES), $objMC, $this->getHELP(new S(ARTICLES_MANAGE_CATEGORIES)));
     }
     // ONLY: Articles.Comments.Do.View
     if ($this->ATH->checkCurrentUserZoneACL($objACL[2])->toBoolean() == TRUE) {
         $objMC = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('articles_file_manage_comments')));
         self::$objAdministration->setSubMLink(new S(ARTICLES_MANAGE_COMMENTS), $objMC, $this->getHELP(new S(ARTICLES_MANAGE_COMMENTS)));
     }
     // ONLY: Articles.Do.Operations
     if ($this->ATH->checkCurrentUserZoneACL($objACL[3])->toBoolean() == TRUE) {
         $objMM = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('articles_file_manage_move_articles')));
         self::$objAdministration->setSubMLink(new S(ARTICLES_MANAGE_ARTICLES_MOVE), $objMM, $this->getHELP(new S(ARTICLES_MANAGE_ARTICLES_MOVE)));
     }
     // ONLY: Articles.Do.Configuration
     if ($this->ATH->checkCurrentUserZoneACL($objACL[4])->toBoolean() == TRUE) {
         $objMF = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('articles_file_manage_configuration')));
         self::$objAdministration->setSubMLink(new S(ARTICLES_MANAGE_ARTICLES_CONFIG), $objMF, $this->getHELP(new S(ARTICLES_MANAGE_ARTICLES_CONFIG)));
     }
     // WIDGET: Statistics for articles ...
     self::$objAdministration->setWidget($this->getHELP(new S('adminStatistics'))->doToken('%r', $this->getPendingReviewArticleCount())->doToken('%p', $this->getPublishedArticleCount())->doToken('%a', $this->getArticleCount())->doToken('%d', $this->getDraftArticleCount())->doToken('%s', $this->getStickyArticleCount()));
     // WIDGET: Latest 10 articles ... no status query ...
     self::$objAdministration->setWidget($this->getHELP(new S('adminWidgetLatest10')), new B(TRUE));
     // WIDGET: Statistics for comments ...
     self::$objAdministration->setWidget($this->getHELP(new S('adminCommentStatistics'))->doToken('%a', $this->getCommentCount(new S('WHERE %objCommentsTableFApproved = "Y"')))->doToken('%u', $this->getCommentCount(new S('WHERE %objCommentsTableFApproved = "N"')))->doToken('%c', $this->getCommentCount()));
     // WIDGET: Latest 10 comments ... no status query ...
     self::$objAdministration->setWidget($this->getHELP(new S('adminWidgetLatest10Comments')), new B(TRUE));
 }
Ejemplo n.º 2
0
 /**
  * Will add the administration menu;
  *
  * This method will tie in the current module with the administration module, while adding the proper administrator links. The
  * files to be required by the administration module are set in the configuration file of this module.
  *
  * @param IFaceAdministration $objAdministrationMech The administration object;
  * @return void Doesn't need to return anything;
  */
 public function tieInWithAdministration(IFaceAdministration $objAdministrationMech)
 {
     // Do a CALL to the parent ...
     parent::tieInWithAdministration($objAdministrationMech);
     // Do the administration menu;
     $objWP = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('faq_file_dashboard')));
     self::$objAdministration->setMenuLink(new S(MANAGE_FAQ), $objWP, $this->getHELP(new S(MANAGE_FAQ)));
     // Set ACLs;
     $objACL = new A();
     $objACL[] = new S('Faq.FAQ.Do.View');
     // ONLY: Faq.FAQ.Do.View
     if ($this->ATH->checkCurrentUserZoneACL($objACL[0])->toBoolean() == TRUE) {
         $objMF = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('faq_file_manage_faq')));
         self::$objAdministration->setSubMLink(new S(MANAGE_FAQ), $objMF, $this->getHELP(new S(MANAGE_FAQ)));
     }
     // WIDGET: Statistics for FAQs ...
     self::$objAdministration->setWidget($this->getHELP(new S('adminStatistics'))->doToken('%q', $this->getFaqCount()));
     // WIDGET: Latest 10 faqs ... no status query ...
     self::$objAdministration->setWidget($this->getHELP(new S('adminWidgetLatest10')), new B(TRUE));
 }
Ejemplo n.º 3
0
 /**
  * Will add the administration menu;
  *
  * This method will tie in the current module with the administration module, while adding the proper administrator links. The
  * files to be required by the administration module are set in the configuration file of this module.
  *
  * @param IFaceAdministration $objAdministrationMech The administration object;
  * @return void Doesn't need to return anything;
  */
 public function tieInWithAdministration(IFaceAdministration $objAdministrationMech)
 {
     // Do the tie ...
     parent::tieInWithAdministration($objAdministrationMech);
     // Do the administration menu;
     $objWP = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('settings_file_dashboard')));
     self::$objAdministration->setMenuLink(new S(SETTINGS_ADMIN), $objWP, $this->getHELP(new S(SETTINGS_MANAGE_SETTINGS)));
     // Set ACLs;
     $objACL = new A();
     $objACL[] = new S('Settings.Do.Configuration');
     $objACL[] = new S('Settings.CountryList.Do.View');
     $objACL[] = new S('Settings.ErrorPages.Do.View');
     // ONLY: Settings.Do.Configuration
     if (self::$objAuthenticationMech->checkCurrentUserZoneACL($objACL[0])->toBoolean() == TRUE) {
         $objMS = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('settings_file_manage_settings')));
         self::$objAdministration->setSubMLink(new S(SETTINGS_MANAGE_SETTINGS), $objMS, $this->getHELP(new S(SETTINGS_MANAGE_SETTINGS)));
     }
     // ONLY: Settings.CountryList.Do.View
     if (self::$objAuthenticationMech->checkCurrentUserZoneACL($objACL[1])->toBoolean() == TRUE) {
         $objMC = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('settings_file_manage_countries')));
         self::$objAdministration->setSubMLink(new S(SETTINGS_MANAGE_COUNTRIES), $objMC, $this->getHELP(new S(SETTINGS_MANAGE_COUNTRIES)));
     }
     // ONLY: Settings.ErrorPages.Do.View
     if (self::$objAuthenticationMech->checkCurrentUserZoneACL($objACL[2])->toBoolean() == TRUE) {
         $objMC = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('settings_file_manage_error_pages')));
         self::$objAdministration->setSubMLink(new S(SETTINGS_MANAGE_ERROR_PAGES), $objMC, $this->getHELP(new S(SETTINGS_MANAGE_ERROR_PAGES)));
     }
 }
Ejemplo n.º 4
0
 /**
  * Will add the administration menu;
  *
  * This method will tie in the current module with the administration module, while adding the proper administrator links. The
  * files to be required by the administration module are set in the configuration file of this module.
  *
  * @param IFaceAdministration $objAdministrationMech The administration object;
  * @return void Doesn't need to return anything;
  */
 public function tieInWithAdministration(IFaceAdministration $objAdministrationMech)
 {
     // Do a CALL to the parent ...
     parent::tieInWithAdministration($objAdministrationMech);
     // Do the administration menu;
     $objWP = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('contact_file_dashboard')));
     self::$objAdministration->setMenuLink(new S(CONTACT_DASHBOARD), $objWP, $this->getHELP(new S(CONTACT_MANAGE_MESSAGES)));
     // Set ACLs;
     $objACL = new A();
     $objACL[] = new S('Contact.Messages.Do.View');
     $objACL[] = new S('Contact.Subjects.Do.View');
     $objACL[] = new S('Contact.Do.Configuration');
     // ONLY: Contact.Messages.Do.View
     if ($this->ATH->checkCurrentUserZoneACL($objACL[0])->toBoolean() == TRUE) {
         $objMM = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('contact_file_manage_messages')));
         self::$objAdministration->setSubMLink(new S(CONTACT_MANAGE_MESSAGES), $objMM, $this->getHELP(new S(CONTACT_MANAGE_MESSAGES)));
     }
     // ONLY: Contact.Subjects.Do.View
     if ($this->ATH->checkCurrentUserZoneACL($objACL[1])->toBoolean() == TRUE) {
         $objMS = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('contact_file_manage_subjects')));
         self::$objAdministration->setSubMLink(new S(CONTACT_MANAGE_SUBJECTS), $objMS, $this->getHELP(new S(CONTACT_MANAGE_SUBJECTS)));
     }
     // ONLY: Contact.Do.Configuration
     if ($this->ATH->checkCurrentUserZoneACL($objACL[2])->toBoolean() == TRUE) {
         $objMC = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('contact_file_manage_configuration')));
         self::$objAdministration->setSubMLink(new S(CONTACT_MANAGE_CONFIG), $objMC, $this->getHELP(new S(CONTACT_MANAGE_CONFIG)));
     }
     // WIDGET: Statistics for contact messages;
     self::$objAdministration->setWidget($this->getHELP(new S('adminStatistics'))->doToken('%r', $this->getMessageCount(new S('WHERE %objContactTableFResolved = "Y"')))->doToken('%u', $this->getMessageCount(new S('WHERE %objContactTableFResolved = "N"')))->doToken('%m', $this->getMessageCount())->doToken('%s', $this->getSubjectCount()));
 }
Ejemplo n.º 5
0
 /**
  * Will add the administration menu;
  *
  * This method will tie in the current module with the administration module, while adding the proper administrator links.
  * The files to be required by the administration module are set in the configuration file of this module.
  *
  * @param IFaceAdministration $objAdministrationMech The administration object;
  * @return void Doesn't need to return anything;
  */
 public function tieInWithAdministration(IFaceAdministration $objAdministrationMech)
 {
     // Do a CALL to the parent ...
     parent::tieInWithAdministration($objAdministrationMech);
     // Do the administration menu;
     $objWP = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('products_file_dashboard')));
     self::$objAdministration->setMenuLink(new S(MANAGE_PRODUCTS), $objWP, $this->getHELP(new S(MANAGE_PRODUCTS)));
     // Set ACLs;
     $objACL = new A();
     $objACL[] = new S('Products.Products.Do.View');
     $objACL[] = new S('Products.Categories.Do.View');
     $objACL[] = new S('Products.Do.Operations');
     $objACL[] = new S('Products.Do.Configuration');
     // ONLY: Products.Products.Do.View;
     if ($this->ATH->checkCurrentUserZoneACL($objACL[0])->toBoolean() == TRUE) {
         $objMF = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('products_file_manage_products')));
         self::$objAdministration->setSubMLink(new S(MANAGE_PRODUCTS), $objMF, $this->getHELP(new S(MANAGE_PRODUCTS)));
     }
     // ONLY: Products.Categories.Do.View;
     if ($this->ATH->checkCurrentUserZoneACL($objACL[1])->toBoolean() == TRUE) {
         $objMF = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('products_file_manage_categories')));
         self::$objAdministration->setSubMLink(new S(MANAGE_PRODUCT_CATEGORIES), $objMF, $this->getHELP(new S(MANAGE_PRODUCT_CATEGORIES)));
     }
     // ONLY: Products.Do.Operations;
     if ($this->ATH->checkCurrentUserZoneACL($objACL[2])->toBoolean() == TRUE) {
         $objMF = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('products_file_manage_operations')));
         self::$objAdministration->setSubMLink(new S(MANAGE_PRODUCT_OPERATIONS), $objMF, $this->getHELP(new S(MANAGE_PRODUCT_OPERATIONS)));
     }
     // ONLY: Products.Do.Configuration;
     if ($this->ATH->checkCurrentUserZoneACL($objACL[3])->toBoolean() == TRUE) {
         $objMF = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('products_file_manage_configuration')));
         self::$objAdministration->setSubMLink(new S(MANAGE_PRODUCT_CONFIGURATION), $objMF, $this->getHELP(new S(MANAGE_PRODUCT_CONFIGURATION)));
     }
     // WIDGET: Statistics for products ...
     self::$objAdministration->setWidget($this->getHELP(new S('adminStatistics'))->doToken('%p', $this->getProductCount())->doToken('%c', $this->getCategoryCount()));
 }
Ejemplo n.º 6
0
 /**
  * Will add the administration menu;
  *
  * This method will tie in the current module with the administration module, while adding the proper administrator links. The
  * files to be required by the administration module are set in the configuration file of this module.
  *
  * @param IFaceAdministration $objAdministrationMech The administration object;
  * @return void Doesn't need to return anything;
  */
 public function tieInWithAdministration(IFaceAdministration $objAdministrationMech)
 {
     // Do the tie ...
     parent::tieInWithAdministration($objAdministrationMech);
     // Do the administration menu;
     $objMF = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('newsletter_file_dashboard')));
     self::$objAdministration->setMenuLink(new S(MANAGE_NEWSLETTER), $objMF, $this->getHELP(new S(MANAGE_NEWSLETTER)));
     // Set ACLs;
     $objACL = new A();
     $objACL[] = new S('Newsletter.Newsletter.Do.View');
     $objACL[] = new S('Newsletter.Categories.Do.View');
     $objACL[] = new S('Newsletter.Do.Operations');
     $objACL[] = new S('Newsletter.Do.Configuration');
     // ONLY: Newsletter.Newsletter.Do.View
     if ($this->ATH->checkCurrentUserZoneACL($objACL[0])->toBoolean() == TRUE) {
         $objMF = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('newsletter_file_manage_newsletter')));
         self::$objAdministration->setSubMLink(new S(MANAGE_NEWSLETTER), $objMF, $this->getHELP(new S(MANAGE_NEWSLETTER)));
     }
     // ONLY: Newsletter.Newsletter.Do.View
     if ($this->ATH->checkCurrentUserZoneACL($objACL[1])->toBoolean() == TRUE) {
         $objMF = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('newsletter_file_manage_categories')));
         self::$objAdministration->setSubMLink(new S(MANAGE_NEWSLETTER_CATEGORIES), $objMF, $this->getHELP(new S(MANAGE_NEWSLETTER_CATEGORIES)));
     }
     // ONLY: Newsletter.Newsletter.Do.View
     if ($this->ATH->checkCurrentUserZoneACL($objACL[2])->toBoolean() == TRUE) {
         $objMF = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('newsletter_file_manage_operations')));
         self::$objAdministration->setSubMLink(new S(MANAGE_NEWSLETTER_OPERATIONS), $objMF, $this->getHELP(new S(MANAGE_NEWSLETTER_OPERATIONS)));
     }
     // ONLY: Newsletter.Newsletter.Do.View
     if ($this->ATH->checkCurrentUserZoneACL($objACL[3])->toBoolean() == TRUE) {
         $objMF = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('newsletter_file_manage_configuration')));
         self::$objAdministration->setSubMLink(new S(MANAGE_NEWSLETTER_CONFIG), $objMF, $this->getHELP(new S(MANAGE_NEWSLETTER_CONFIG)));
     }
 }
Ejemplo n.º 7
0
 /**
  * Will tie the current object with administration;
  *
  * This method will tie in the current object with the administration object. It will set the proper menu links and sublinks,
  * needed for the administration module, and will store the administration object for further use later. We do this just to
  * avoid adding subsequent PHP code for a manual tie later;
  *
  * @param IFaceAdministration $objAdminMechanism The administration object;
  * @return void Doesn't return anything, probably giving an error if it encounters one;
  */
 public function tieInWithAdministration(IFaceAdministration $objAdminMechanism)
 {
     // Do a parent::CALL, for some predefined defaults; Save the object after;
     parent::tieInWithAdministration($objAdminMechanism);
     // Do the administration menu;
     $objWP = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('authentication_file_dashboard')));
     self::$objAdministration->setMenuLink(new S(AUTHENTICATION_MANAGE_USERS), $objWP, $this->getHELP(new S(AUTHENTICATION_MANAGE_USERS)));
     $objACL = new A();
     $objACL[] = new S('Authentication.Users.Do.View');
     $objACL[] = new S('Authentication.Groups.Do.View');
     $objACL[] = new S('Authentication.Zones.Do.View');
     $objACL[] = new S('Authentication.ACLsForGroups.Do.View');
     $objACL[] = new S('Authentication.ACLsForUsers.Do.View');
     $objACL[] = new S('Authentication.Do.Configuration');
     // ONLY: Authentication.Users.Do.View
     if ($this->checkCurrentUserZoneACL($objACL[0])->toBoolean() == TRUE) {
         $objMU = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('authentication_file_manage_users')));
         self::$objAdministration->setSubMLink(new S(AUTHENTICATION_MANAGE_USERS), $objMU, $this->getHELP(new S(AUTHENTICATION_MANAGE_USERS)));
     }
     // ONLY: Authentication.Groups.Do.View
     if ($this->checkCurrentUserZoneACL($objACL[1])->toBoolean() == TRUE) {
         $objMG = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('authentication_file_manage_groups')));
         self::$objAdministration->setSubMLink(new S(AUTHENTICATION_MANAGE_GROUPS), $objMG, $this->getHELP(new S(AUTHENTICATION_MANAGE_GROUPS)));
     }
     // ONLY: Authentication.Zones.Do.View
     if ($this->checkCurrentUserZoneACL($objACL[2])->toBoolean() == TRUE) {
         $objMZ = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('authentication_file_manage_zones')));
         self::$objAdministration->setSubMLink(new S(AUTHENTICATION_MANAGE_ZONES), $objMZ, $this->getHELP(new S(AUTHENTICATION_MANAGE_ZONES)));
     }
     // ONLY: Authentication.ACLForGroups.Do.View
     if ($this->checkCurrentUserZoneACL($objACL[3])->toBoolean() == TRUE) {
         $objMM = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('authentication_file_manage_zones_mapping')));
         self::$objAdministration->setSubMLink(new S(AUTHENTICATION_MANAGE_ZONES_MAPPING), $objMM, $this->getHELP(new S(AUTHENTICATION_MANAGE_ZONES_MAPPING)));
     }
     // ONLY: Authentication.ACLForUsers.Do.View
     if ($this->checkCurrentUserZoneACL($objACL[4])->toBoolean() == TRUE) {
         $objMU = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('authentication_file_manage_zones_mapping_fusr')));
         self::$objAdministration->setSubMLink(new S(AUTHENTICATION_MANAGE_ZONES_MAPPING_FOR_USERS), $objMU, $this->getHELP(new S(AUTHENTICATION_MANAGE_ZONES_MAPPING)));
     }
     // ONLY: Authentication.Do.Configuration
     if ($this->checkCurrentUserZoneACL($objACL[5])->toBoolean() == TRUE) {
         $objMC = new FilePath($this->getPathToAdmin()->toRelativePath() . $this->getConfigKey(new S('authentication_file_manage_configuration')));
         self::$objAdministration->setSubMLink(new S(AUTHENTICATION_MANAGE_CONFIGURATION), $objMC, $this->getHELP(new S(AUTHENTICATION_MANAGE_CONFIGURATION)));
     }
     // WIDGET: Statistics for users ...
     self::$objAdministration->setWidget($this->getHELP(new S('adminStatistics'))->doToken('%u', $this->getUserCount())->doToken('%g', $this->getGroupCount())->doToken('%z', $this->getZoneCount()));
     // WIDGET: Latest 10 users ... no status query ...
     self::$objAdministration->setWidget($this->getHELP(new S('adminWidgetLatest10')), new B(TRUE));
 }
Ejemplo n.º 8
0
 /**
  * Will add the administration menu;
  *
  * This method will tie in the current module with the administration module, while adding the proper administrator links. The
  * files to be required by the administration module are set in the configuration file of this module.
  *
  * @param IFaceAdministration $objAdministrationMech The administration object;
  * @return void Doesn't need to return anything;
  */
 public function tieInWithAdministration(IFaceAdministration $objAdministrationMech)
 {
     // Do the tie ...
     parent::tieInWithAdministration($objAdministrationMech);
     // Do the administration menu;
 }