Beispiel #1
0
 public function __construct()
 {
     /*
      * Call parent construct
      */
     parent::__construct();
     import('system/contrib/admin/base');
     import('system/contrib/auth/plugins');
     /*
      * Initialize the Pluggable if it doesn't initialized.
      */
     if (!Pluggable::$inited) {
         Pluggable::init($this);
     }
     /*
      * smarty instance
      */
     $this->smarty = $this->load('smarty');
     /*
      * admin_required, if use RBAC, this will another use
      */
     AuthPlugins::admin_required($this);
     Pluggable::trigger('before_admin_site_run');
     $this->smarty->assign('admin_menus', BaseAdmin::build_menus());
 }
Beispiel #2
0
 /**
  * Returns a peer instance associated with this om.
  *
  * Since Peer classes are not to have any instance attributes, this method returns the
  * same instance for all member of this class. The method could therefore
  * be static, but this would prevent one from overriding the behavior.
  *
  * @return     AdminPeer
  */
 public function getPeer()
 {
     if (self::$peer === null) {
         self::$peer = new AdminPeer();
     }
     return self::$peer;
 }
Beispiel #3
0
 public function init()
 {
     parent::init();
 }
Beispiel #4
0
 public function init()
 {
     parent::init();
     $this->getView()->assign('layer_nav_second', '主页');
 }
Beispiel #5
0
 function Admin($object = null)
 {
     parent::__construct($object);
 }
Beispiel #6
0
 /**
  * @return Admin
  */
 public static function model($className = __CLASS__)
 {
     return parent::model($className);
 }