Beispiel #1
0
 /**
  * Construct
  *
  * @param   array $config options
  */
 public function __construct($config = array())
 {
     $this->fundleMenus();
     if (!$this->shouldUpgrade()) {
         return parent::__construct($config);
     }
     $this->upgrade();
     return parent::__construct($config);
 }
Beispiel #2
0
 /**
  * Constructor.
  *
  * @param   array $config An optional associative array of configuration settings.
  *
  * @throws UnexpectedValueException
  */
 public function __construct($config = array())
 {
     parent::__construct($config);
     $listModel = ArrayHelper::getValue($config, 'listModel', JModelLegacy::getInstance('List', 'FabrikAdminModel'));
     if (!is_a($listModel, 'FabrikAdminModelList')) {
         throw new UnexpectedValueException('Content Type Constructor requires an Admin List Model');
     }
     $this->listModel = $listModel;
     $this->doc = new DOMDocument();
 }
Beispiel #3
0
 /**
  * Construct
  *
  * @param   array  $config  options
  */
 public function __construct($config = array())
 {
     $this->fundleMenus();
     if (!$this->shouldUpgrade()) {
         JFactory::getApplication()->enqueueMessage('Already updated');
         return parent::__construct($config);
     }
     if ($this->backUp()) {
         $this->upgrade();
     }
     JFactory::getApplication()->enqueueMessage('Upgraded OK!');
     return parent::__construct($config);
 }
Beispiel #4
0
 /**
  * Constructor.
  * Ensure that we use the fabrik db model for the dbo
  *
  * @param   array $config An optional associative array of configuration settings.
  */
 public function __construct($config = array())
 {
     $config['dbo'] = FabrikWorker::getDbo(true);
     parent::__construct($config);
 }