Inheritance: extends AdminPageFramework_View
Example #1
0
 /**
  * Registers necessary callbacks ans sets up internal components including properties.
  * 
  * <h4>Example</h4>
  * <code>if ( is_admin() ) {
  *     new MyAdminPageClass( 'my_custom_option_key', __FILE__ );
  * }</code>
  * 
  * @access      public
  * @since       2.0.0
  * @see         http://codex.wordpress.org/Roles_and_Capabilities
  * @see         http://codex.wordpress.org/I18n_for_WordPress_Developers#Text_Domains
  * @param       string      $sOptionKey         (optional) specifies the option key name to store in the options table. If this is not set, the instantiated class name will be used.
  * @param       string      $sCallerPath        (optional) used to retrieve the plugin/theme details to auto-insert the information into the page footer.
  * @param       string      $sCapability        (optional) sets the overall access level to the admin pages created by the framework. The used capabilities are listed <a href="http://codex.wordpress.org/Roles_and_Capabilities">here</a>. The capability can be set per page, tab, setting section, setting field. Default: `manage_options`
  * @param       string      $sTextDomain        (optional) the <a href="http://codex.wordpress.org/I18n_for_WordPress_Developers#Text_Domains" target="_blank">text domain</a> used for the framework's system messages. Default: admin-page-framework.
  * @return      void        returns nothing.
  */
 public function __construct($sOptionKey = null, $sCallerPath = null, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework')
 {
     if (!$this->_isInstantiatable()) {
         return;
     }
     parent::__construct($sOptionKey, $sCallerPath ? trim($sCallerPath) : ($sCallerPath = is_admin() && (isset($GLOBALS['pagenow']) && in_array($GLOBALS['pagenow'], array('plugins.php')) || isset($_GET['page'])) ? AdminPageFramework_Utility::getCallerScriptPath(__FILE__) : null), $sCapability, $sTextDomain);
     $this->oUtil->addAndDoAction($this, 'start_' . $this->oProp->sClassName, $this);
 }
 public function __construct($isOptionKey = null, $sCallerPath = null, $sCapability = 'manage_options', $sTextDomain = 'admin-page-framework')
 {
     if (!$this->_isInstantiatable()) {
         return;
     }
     parent::__construct($isOptionKey, $this->_getCallerPath($sCallerPath), $sCapability, $sTextDomain);
 }