Example #1
0
 /**
  * constructor (registers additional tasks to methods)
  * @return void
  */
 function __construct()
 {
     parent::__construct();
     // Register Extra tasks
     $this->registerTask('add', 'edit');
     $this->registerTask('unpublish', 'publish');
 }
Example #2
0
 /**
  * Constructor.
  *
  * @param	array An optional associative array of configuration settings.
  * @see		JController
  */
 public function __construct($config = array())
 {
     parent::__construct($config);
     $this->registerTask('unpublish', 'publish');
     $this->registerTask('orderup', 'reorder');
     $this->registerTask('orderdown', 'reorder');
 }
Example #3
0
 /**
  * Constructor
  */
 function __construct($config = array())
 {
     parent::__construct($config);
     // Register Extra tasks
     $this->registerTask('add', 'edit');
     $this->registerTask('apply', 'save');
 }
Example #4
0
 /**
  * Constructor
  */
 public function __construct($config = array())
 {
     parent::__construct($config);
     $this->registerTask('apply', 'save');
     $this->registerTask('save2new', 'save');
     $this->registerTask('save2copy', 'save');
 }
Example #5
0
 function __construct()
 {
     parent::__construct();
     $this->registerTask('unpublish', 'publish');
     $this->registerTask('feature', 'toggleFeature');
     $this->registerTask('unfeature', 'toggleFeature');
 }
Example #6
0
 /**
  * Constructor.
  *
  * @param   array  $config  An optional associative array of configuration settings.
  *
  * @see     JController
  * @since   11.1
  * @throws  Exception
  */
 public function __construct($config = array())
 {
     parent::__construct($config);
     // Define standard task mappings.
     // Value = 0
     $this->registerTask('unpublish', 'publish');
     // Value = 2
     $this->registerTask('archive', 'publish');
     // Value = -2
     $this->registerTask('trash', 'publish');
     // Value = -3
     $this->registerTask('report', 'publish');
     $this->registerTask('orderup', 'reorder');
     $this->registerTask('orderdown', 'reorder');
     // Guess the option as com_NameOfController.
     if (empty($this->option)) {
         $this->option = 'com_' . strtolower($this->getName());
     }
     // Guess the JText message prefix. Defaults to the option.
     if (empty($this->text_prefix)) {
         $this->text_prefix = strtoupper($this->option);
     }
     // Guess the list view as the suffix, eg: OptionControllerSuffix.
     if (empty($this->view_list)) {
         $r = null;
         if (!preg_match('/(.*)Controller(.*)/i', get_class($this), $r)) {
             throw new Exception(JText::_('JLIB_APPLICATION_ERROR_CONTROLLER_GET_NAME'), 500);
         }
         $this->view_list = strtolower($r[2]);
     }
 }
Example #7
0
 public function __construct($config = array())
 {
     if (empty($config['default_task'])) {
         $config['default_task'] = 'index';
     }
     parent::__construct($config);
 }
 public function __construct($default = array())
 {
     parent::__construct($default);
     JRequest::setVar('view', 'sample_catalog');
     JRequest::setVar('layout', 'default');
     JRequest::setVar('hidemainmenu', 1);
 }
Example #9
0
 function LinkrController()
 {
     parent::__construct();
     // Include paths
     $this->addViewPath(JPATH_COMPONENT_ADMINISTRATOR . DS . 'views');
     $this->addModelPath(JPATH_COMPONENT_ADMINISTRATOR . DS . 'models');
 }
Example #10
0
 function __construct($config = array())
 {
     parent::__construct($config);
     $this->registerTask('installcore', 'display');
     $this->registerTask('installtheme', 'display');
     $this->registerTask('installsuccessfully', 'display');
 }
Example #11
0
 /**
  * Constructor.
  *
  * @param   array  $default  config array
  */
 public function __construct($default = array())
 {
     $this->_order_functions = new order_functions();
     $this->_shippinghelper = new shipping();
     JRequest::setVar('layout', 'default');
     parent::__construct($default);
 }
Example #12
0
 /**
  * Custom Constructor
  */
 function __construct($default = array())
 {
     // Set a default view if none exists
     if (!JRequest::getCmd('view')) {
         JRequest::setVar('view', 'projects');
     }
     $task = JRequest::getVar('task');
     $searchType = JRequest::getVar('searchType', '');
     $id = JRequest::getInt('id', 0);
     parent::__construct($default);
     /*if ( $id )
     		{
     			// view property detail
     			$this->viewDetail($id );
     		}
     		else
     		{
     			if ( $task == 'search' && $searchType != 'filter')
     			{
     				// remove session of before search
     				unset( $_SESSION['projectSearch'] );
     			}
     			$this->searchProject();
     		}*/
 }
Example #13
0
 /**
  * Constructor for the tasker
  *
  * @return joomfishTasker
  */
 public 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->_joomfishManager = JoomFishManager::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
     global $mainframe;
     $this->_catid = $mainframe->getUserStateFromRequest('selected_catid', 'catid', '');
     $this->_select_language_id = $mainframe->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);
 }
 /**
  * constructor (registers additional tasks to methods)
  * @return void
  */
 function __construct()
 {
     parent::__construct();
     // Register Extra tasks
     $this->registerTask('add', 'assignCP');
     $this->registerTask('replace', 'assignCP');
 }
Example #15
0
 public function __construct($default = array())
 {
     parent::__construct($default);
     // init vars
     $this->joomla = JFactory::getApplication();
     $this->user = JFactory::getUser();
     $this->session = JFactory::getSession();
     $this->document = JFactory::getDocument();
     $this->dispatcher = JDispatcher::getInstance();
     $this->option = YRequest::getCmd('option');
     $this->link_base = 'index.php?option=' . $this->option;
     $this->controller = $this->getName();
     // add super administrator var to user
     $this->user->superadmin = UserHelper::isJoomlaSuperAdmin($this->user);
     // init additional admin vars
     if ($this->joomla->isAdmin()) {
         $this->baseurl = 'index.php?option=' . $this->option . '&controller=' . $this->getName();
     }
     // init additional site vars
     if ($this->joomla->isSite()) {
         $this->itemid = (int) $GLOBALS['Itemid'];
         $this->params = $this->joomla->getParams();
         $this->pathway = $this->joomla->getPathway();
     }
 }
Example #16
0
 function __construct()
 {
     global $mainframe;
     parent::__construct();
     $this->registerDefaultTask('display');
     $this->registerTask('clearCache', 'clearCache');
 }
Example #17
0
 /**
  * Base Controller Constructor
  *
  * @param array $config Controller initialization configuration parameters
  * @return void
  * @since 0.1
  */
 public function __construct($config = array())
 {
     parent::__construct($config);
     $this->set('option', JRequest::getCmd('option'));
     JModel::addIncludePath(JPATH_SITE . '/components/com_api/models');
     JTable::addIncludePath(JPATH_SITE . '/components/com_api/tables');
 }
 public function __construct($config = array())
 {
     parent::__construct($config);
     if (AKEEBA_JVERSION == '16') {
         // Access check, Joomla! 1.6 style.
         $user = JFactory::getUser();
         if (!$user->authorise('akeeba.download', 'com_akeeba')) {
             $this->setRedirect('index.php?option=com_akeeba');
             return JError::raiseWarning(403, JText::_('JERROR_ALERTNOAUTHOR'));
             $this->redirect();
         }
     } else {
         // Custom ACL for Joomla! 1.5
         $aclModel = JModel::getInstance('Acl', 'AkeebaModel');
         if (!$aclModel->authorizeUser('download')) {
             $this->setRedirect('index.php?option=com_akeeba');
             return JError::raiseWarning(403, JText::_('Access Forbidden'));
             $this->redirect();
         }
     }
     $base_path = JPATH_COMPONENT_ADMINISTRATOR . '/plugins';
     $model_path = $base_path . '/models';
     $view_path = $base_path . '/views';
     $this->addModelPath($model_path);
     $this->addViewPath($view_path);
 }
 /**
  * Constructor
  * @access private
  * @subpackage Crosswords
  */
 function __construct()
 {
     parent::__construct();
     $this->registerDefaultTask('show_cpanel');
     $this->registerTask('crosswords', 'get_crosswords');
     $this->registerTask('keywords', 'get_keywords');
     $this->registerTask('categories', 'get_categories');
     $this->registerTask('config', 'get_config');
     $this->registerTask('about', 'show_about');
     $this->registerTask('edit_crossword', 'edit_crossword');
     $this->registerTask('edit_keyword', 'edit_keyword');
     $this->registerTask('edit_category', 'edit_category');
     $this->registerTask('save_crossword', 'save_crossword');
     $this->registerTask('save_keyword', 'save_keyword');
     $this->registerTask('save_category', 'save_category');
     $this->registerTask('save_config', 'save_config');
     $this->registerTask('publish_crosswords', 'publish_crosswords');
     $this->registerTask('unpublish_crosswords', 'unpublish_crosswords');
     $this->registerTask('publish_keywords', 'publish_keywords');
     $this->registerTask('unpublish_keywords', 'unpublish_keywords');
     $this->registerTask('publish_categories', 'publish_categories');
     $this->registerTask('unpublish_categories', 'unpublish_categories');
     $this->registerTask('delete_keywords', 'delete_keywords');
     $this->registerTask('delete_crosswords', 'delete_crosswords');
     $this->registerTask('keywords_uses', 'get_keywords_uses');
     $this->registerTask('cancel', 'cancel');
 }
Example #20
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');
 }
Example #21
0
 function __construct($config = array())
 {
     parent::__construct($config);
     // Register Extra tasks
     $this->registerTask('add', 'display');
     $this->registerTask('edit', 'display');
 }
Example #22
0
 function __construct()
 {
     $this->_flag = 0;
     parent::__construct();
     $this->registerTask('info', 'info');
     $this->registerTask('submit', 'submit');
 }
Example #23
0
 /**
  * Constructor.
  *
  * @param	array An optional associative array of configuration settings.
  * @see		JController
  */
 public function __construct($config = array())
 {
     parent::__construct($config);
     $this->registerTask('unpublish', 'publish');
     $this->registerTask('archive', 'publish');
     $this->registerTask('trash', 'publish');
 }
 public function __construct()
 {
     parent::__construct();
     $this->registerTask('switch', 'switchStores');
     $this->registerTask('login', 'ssoCheck');
     $this->registerTask('logout', 'ssoCheck');
 }
Example #25
0
 function __construct()
 {
     parent::__construct();
     if (RSFormProHelper::isJ16()) {
         JHTML::_('behavior.framework');
     }
     if (!headers_sent()) {
         header('Content-type: text/html; charset=utf-8');
     }
     $this->_db = JFactory::getDBO();
     $doc =& JFactory::getDocument();
     $doc->addScript(JURI::root(true) . '/administrator/components/com_rsform/assets/js/jquery.js?v=40');
     $doc->addScript(JURI::root(true) . '/administrator/components/com_rsform/assets/js/tablednd.js?v=40');
     $doc->addScript(JURI::root(true) . '/administrator/components/com_rsform/assets/js/jquery.scrollto.js?v=40');
     $doc->addScript(JURI::root(true) . '/administrator/components/com_rsform/assets/js/script.js?v=41');
     $doc->addStyleSheet(JURI::root(true) . '/administrator/components/com_rsform/assets/css/style.css?v=42');
     if (RSFormProHelper::isJ16()) {
         $doc->addStyleSheet(JURI::root(true) . '/administrator/components/com_rsform/assets/css/style16.css?v=40');
     }
     $this->registerTask('formsApply', 'formsSave');
     $this->registerTask('formsPublish', 'formsChangeStatus');
     $this->registerTask('formsUnpublish', 'formsChangeStatus');
     $this->registerTask('componentsPublish', 'componentsChangeStatus');
     $this->registerTask('componentsUnpublish', 'componentsChangeStatus');
     $this->registerTask('configurationApply', 'configurationSave');
     $this->registerTask('submissionsExportCSV', 'submissionsExport');
     $this->registerTask('submissionsExportExcel', 'submissionsExport');
     $this->registerTask('submissionsExportXML', 'submissionsExport');
     $this->registerTask('submissionsApply', 'submissionsSave');
     $this->registerTask('submissionsSave', 'submissionsSave');
     $this->registerTask('richtextApply', 'richtextSave');
     $this->registerTask('emailApply', 'emailSave');
 }
Example #26
0
 public function __construct()
 {
     parent::__construct();
     $this->registerTask('apply', 'save');
     $this->registerTask('add', 'edit');
     $this->registerTask('unpublish', 'publish');
 }
Example #27
0
 function __construct($default = array())
 {
     parent::__construct($default);
     $this->registerTask('apply', 'save');
     $this->registerTask('edit', 'display');
     $this->registerTask('add', 'display');
 }
Example #28
0
 /**
  * PHP 4 constructor for the tasker
  *
  * @return joomfishTasker
  */
 function __construct()
 {
     parent::__construct();
     $this->registerTask('show', 'display');
     $this->registerTask('check', 'checkstatus');
     $this->registerTask('copy', 'copy');
 }
Example #29
0
 public function __construct()
 {
     parent::__construct();
     $this->useSSL = VmConfig::get('useSSL', 0);
     $this->useXHTML = true;
     VmConfig::loadJLang('com_virtuemart_shoppers', TRUE);
 }
Example #30
0
 function __construct($config = array())
 {
     parent::__construct($config);
     JPluginHelper::importPlugin('jshoppingcheckout');
     JPluginHelper::importPlugin('jshoppingorder');
     JDispatcher::getInstance()->trigger('onConstructJshoppingControllerUser', array(&$this));
 }