예제 #1
0
 /**
 	/* Class constructor
 * 
 * @access public
 * @param $config array
 * @return Object&
 */
 public function __construct(array $config = array())
 {
     parent::__construct($config);
     $langParams = JComponentHelper::getParams('com_languages');
     $this->langtag = $langParams->get('site');
     // Setup predefined site language for placeholders replacement according to RFC 3066 and Virtuemart tables
     $this->language = str_replace('-', '_', strtolower($this->langtag));
     if (!empty($config)) {
         $this->extension = $config['extension'];
         $this->sourcesModel = $config['sourcesModel'];
     }
 }
예제 #2
0
 /**
  * Class constructor
  *
  * @access public
  * @param $config array
  * @return Object&
  */
 public function __construct($config = array())
 {
     parent::__construct($config);
     $componentParams = JComponentHelper::getParams($this->option);
     $this->setState('cparams', $componentParams);
 }
예제 #3
0
 /**
  * Class Constructor
  * @access public
  * @return Object&
  */
 function __construct($config = array())
 {
     parent::__construct($config);
     $this->cparams = $this->app->getParams('com_jmap');
     // Check if a module request is detected, in this case merge module params instead of menu view params: Component -> module specific level params override
     if (isset($config['jmap_module']) && $config['jmap_module']) {
         $query = $this->_db->getQuery(true);
         $query->select('params');
         $query->from('#__modules');
         $query->where($this->_db->quoteName('id') . ' = ' . (int) $config['jmap_module']);
         $strParams = $this->_db->setQuery($query)->loadResult();
         $moduleParams = new JRegistry();
         $moduleParams->loadString($strParams);
         // Merge module params in place of view params simulating
         $this->cparams->merge($moduleParams);
         // Ensure all links will open up the parent main window
         $this->cparams->set('opentarget', '_parent');
     }
     $this->setState('cparams', $this->cparams);
     $this->documentFormat = $config['document_format'];
     $this->setState('documentformat', $this->documentFormat);
     // Languages installed on this system
     $langManager = JFactory::getLanguage();
     $this->fallbackDefaultLanguage = $langManager->getDefault();
     $this->fallbackDefaultLanguageRFC = str_replace('-', '_', strtolower($this->fallbackDefaultLanguage));
     $this->langTag = $langManager->getTag();
     $this->siteLanguageRFC = str_replace('-', '_', strtolower($this->langTag));
     // Init supported 3PD extensions tables for Google news sitemap
     $this->supportedGNewsTablesOptions = array('#__k2_items', '#__zoo_item', '#__easyblog_post');
     // Calculate limitstart and limitrows if precaching process detected
     if (isset($config['iteration_counter'])) {
         $formatLimitParam = in_array($this->documentFormat, array('images', 'videos')) ? $this->cparams->get('precaching_limit_images', 50) : $this->cparams->get('precaching_limit_xml', 5000);
         $this->limitStart = $config['iteration_counter'] * $formatLimitParam;
         $this->limitRows = $formatLimitParam;
     }
 }
예제 #4
0
 /**
  * Return select lists used as filter for editEntity
  *
  * @access public
  * @param Object $record
  * @return array
  */
 public function getLists($record = null)
 {
     $lists = parent::getLists($record);
     $lists['sources'] = array();
     // Select all published data sources
     $query = $this->_db->getQuery(true);
     $query->select($this->_db->quoteName('id'));
     $query->select($this->_db->quoteName('name'));
     $query->from($this->_db->quoteName('#__jmap'));
     $query->where($this->_db->quoteName('published') . ' = 1');
     $query->order($this->_db->quoteName('ordering'));
     $this->_db->setQuery($query);
     $lists['sources'] = $this->_db->loadObjectList();
     return $lists;
 }
예제 #5
0
 /**
  * Class Constructor
  * @access public
  * @return Object&
  */
 function __construct($config = array())
 {
     parent::__construct($config);
     $this->cparams = $this->app->getParams('com_jmap');
     $this->setState('cparams', $this->cparams);
     $this->documentFormat = $config['document_format'];
     $this->setState('documentformat', $this->documentFormat);
     // Languages installed on this system
     $langManager = JFactory::getLanguage();
     $this->fallbackDefaultLanguage = $langManager->getDefault();
     $this->fallbackDefaultLanguageRFC = str_replace('-', '_', strtolower($this->fallbackDefaultLanguage));
     $this->langTag = $langManager->getTag();
     $this->siteLanguageRFC = str_replace('-', '_', strtolower($this->langTag));
     // Init supported 3PD extensions tables for Google news sitemap
     $this->supportedGNewsTablesOptions = array('#__k2_items', '#__zoo_item');
     // Calculate limitstart and limitrows if precaching process detected
     if (isset($config['iteration_counter'])) {
         $formatLimitParam = $this->documentFormat == 'images' ? $this->cparams->get('precaching_limit_images', 50) : $this->cparams->get('precaching_limit_xml', 5000);
         $this->limitStart = $config['iteration_counter'] * $formatLimitParam;
         $this->limitRows = $formatLimitParam;
     }
 }