Пример #1
0
 /**
  * Joom!Fish Controler for the Control Panel
  * @param array		configuration
  * @return joomfishTasker
  */
 function __construct($config = array())
 {
     parent::__construct($config);
     $this->registerTask('show', 'display');
     $this->registerTask('postInstall', 'postInstall');
     $this->registerTask('information', 'information');
 }
Пример #2
0
 /**
  * PHP 4 constructor for the tasker
  *
  * @return joomfishTasker
  */
 function __construct()
 {
     parent::__construct();
     $this->registerDefaultTask('show');
     $this->act = JRequest::getVar('act', '');
     $this->task = JRequest::getVar('task', '');
     $this->cid = JRequest::getVar('cid', array(0));
     if (!is_array($this->cid)) {
         $this->cid = array(0);
     }
     $this->fileCode = JRequest::getVar('fileCode', '');
     $this->_falangManager = FalangManager::getInstance();
     $this->registerTask('show', 'showCElementConfig');
     $this->registerTask('detail', 'showElementConfiguration');
     $this->registerTask('remove', 'removeContentElement');
     $this->registerTask('remove_install', 'removeContentElement');
     $this->registerTask('installer', 'showContentElementsInstaller');
     $this->registerTask('uploadfile', 'installContentElement');
     // Populate data used by controller
     $app = JFactory::getApplication();
     $this->_catid = $app->getUserStateFromRequest('selected_catid', 'catid', '');
     $this->_select_language_id = $app->getUserStateFromRequest('selected_lang', 'select_language_id', '-1');
     $this->_language_id = JRequest::getVar('language_id', $this->_select_language_id);
     $this->_select_language_id = $this->_select_language_id == -1 && $this->_language_id != -1 ? $this->_language_id : $this->_select_language_id;
     // Populate common data used by view
     // get the view
     $this->view = $this->getView("elements");
     // Assign data for view
     $this->view->assignRef('catid', $this->_catid);
     $this->view->assignRef('select_language_id', $this->_select_language_id);
     $this->view->assignRef('task', $this->task);
     $this->view->assignRef('act', $this->act);
 }
Пример #3
0
 /**
  * Joom!Fish Controler for the Control Panel
  * @param array		configuration
  * @return joomfishTasker
  */
 function __construct($config = array())
 {
     parent::__construct($config);
     $this->registerTask('show', 'display');
     // ensure DB cache table is created and up to date
     JLoader::import('helpers.controllerHelper', FALANG_ADMINPATH);
     JLoader::import('classes.JCacheStorageJFDB', FALANG_ADMINPATH);
     FalangControllerHelper::_checkDBCacheStructure();
     FalangControllerHelper::_checkDBStructure();
     if (!FalangControllerHelper::_testSystemBotState()) {
         echo "<div style='font-size:16px;font-weight:bold;color:red'>" . JText::_('COM_FALANG_TEST_SYSTEM_ERROR') . "</div>";
     }
 }
Пример #4
0
 function __construct($config = array())
 {
     parent::__construct($config);
     $this->registerTask('show', 'display');
     // ensure DB cache table is created and up to date
     JLoader::import('helpers.controllerHelper', FALANG_ADMINPATH);
     //v 1.4 remove cache table creation and check
     //JLoader::import( 'classes.JCacheStorageJFDB',FALANG_ADMINPATH);
     //FalangControllerHelper::_checkDBCacheStructure();
     FalangControllerHelper::_checkDBStructure();
     if (!FalangControllerHelper::_testSystemBotState()) {
         //todo mettre l'affichage dans la vue
         $msg = '<div class="alert alert-warning">';
         $msg .= '<h4>' . JText::_('COM_FALANG_TEST_SYSTEM_WARNING') . '</h4>';
         $msg .= '<p>' . JText::_('COM_FALANG_TEST_SYSTEM_WARNING_MSG') . '</p>';
         $msg .= '</div>';
         echo $msg;
     }
 }
Пример #5
0
 function __construct()
 {
     parent::__construct();
     $this->registerDefaultTask('showTranslate');
     $this->act = JRequest::getVar('act', '');
     $this->task = JRequest::getVar('task', '');
     $this->cid = JRequest::getVar('cid', array(0));
     if (!is_array($this->cid)) {
         $this->cid = array(0);
     }
     $this->fileCode = JRequest::getVar('fileCode', '');
     $this->_falangManager = FalangManager::getInstance();
     $this->registerTask('overview', 'showTranslate');
     $this->registerTask('cancel', 'showTranslate');
     $this->registerTask('edit', 'editTranslation');
     $this->registerTask('apply', 'saveTranslation');
     $this->registerTask('save', 'saveTranslation');
     $this->registerTask('publish', 'publishTranslation');
     // NB the method will check on task
     $this->registerTask('unpublish', 'publishTranslation');
     $this->registerTask('remove', 'removeTranslation');
     $this->registerTask('preview', 'previewTranslation');
     $this->registerTask('orphans', 'showOrphanOverview');
     $this->registerTask('orphandetail', 'showOrphanDetail');
     $this->registerTask('removeorphan', 'removeOrphan');
     $this->registerTask('editfree', 'editFreeTranslation');
     // Populate data used by controller
     $app = JFactory::getApplication();
     $this->_catid = $app->getUserStateFromRequest('selected_catid', 'catid', '');
     $this->_select_language_id = $app->getUserStateFromRequest('selected_lang', 'select_language_id', '-1');
     $this->_language_id = JRequest::getVar('language_id', $this->_select_language_id);
     $this->_select_language_id = $this->_select_language_id == -1 && $this->_language_id != -1 ? $this->_language_id : $this->_select_language_id;
     // Populate common data used by view
     // get the view
     $this->view = $this->getView("translate");
     $model = $this->getModel('translate');
     $this->view->setModel($model, true);
     // Assign data for view
     $this->view->assignRef('catid', $this->_catid);
     $this->view->assignRef('select_language_id', $this->_select_language_id);
     $this->view->assignRef('task', $this->task);
     $this->view->assignRef('act', $this->act);
 }
Пример #6
0
 function __construct($config)
 {
     parent::__construct($config);
     $this->component = JRequest::getCmd('option');
     if (isset($config['entity_name'])) {
         $this->entityName = $config['entity_name'];
     } else {
         $this->entityName = $this->getEntityName();
     }
     if (isset($config['language_prefix'])) {
         $this->langPrefix = $config['language_prefix'];
     } else {
         $this->langPrefix = OSF_LANG_PREFIX;
     }
     if (isset($config['view_list_url'])) {
         $this->viewListUrl = $config['view_list_url'];
     } else {
         $this->viewListUrl = 'index.php?option=' . $this->component . '&view=' . OSInflector::pluralize($this->entityName);
     }
     $this->registerTask('apply', 'save');
 }
Пример #7
0
 /**
  * Constructor function
  *
  * @param array $config
  */
 function __construct($config = array())
 {
     parent::__construct($config);
 }