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()); }
/** * 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; }
public function init() { parent::init(); }
public function init() { parent::init(); $this->getView()->assign('layer_nav_second', '主页'); }
function Admin($object = null) { parent::__construct($object); }
/** * @return Admin */ public static function model($className = __CLASS__) { return parent::model($className); }