Esempio n. 1
0
 /**
  * Returns a refernce to the global ZenGridTemplate object, only creating it if it doesn't already exist.
  *
  * This method must be invoked as: $zgf = ZenGridTemplate::getInstance();
  *
  * @return  ZenGridTemplate
  *
  * @since   1.0.0
  */
 public static function getInstance()
 {
     // Only create the object if it doesn't exist.
     if (empty(self::$instance)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Esempio n. 2
0
 public function __construct($plugin = null)
 {
     $this->app = JFactory::getApplication();
     $this->doc = JFactory::getDocument();
     $this->plugin = $plugin;
     self::$isJ15 = version_compare(JVERSION, '1.6', '<');
     if (is_object($this->plugin)) {
         $this->plugin->loadLanguage();
     }
     $this->template = ZenGridTemplate::getInstance();
 }