当前位置: 首页>>代码示例>>PHP>>正文


PHP InstallerHelper类代码示例

本文整理汇总了PHP中InstallerHelper的典型用法代码示例。如果您正苦于以下问题:PHP InstallerHelper类的具体用法?PHP InstallerHelper怎么用?PHP InstallerHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了InstallerHelper类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: display

 /**
  * Method to display a view.
  *
  * @param	boolean			If true, the view output will be cached
  * @param	array			An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return	JController		This object to support chaining.
  * @since	1.5
  */
 public function display($cachable = false, $urlparams = false)
 {
     require_once JPATH_COMPONENT . '/helpers/installer.php';
     // Get the document object.
     $document = JFactory::getDocument();
     // Set the default view name and format from the Request.
     $vName = JRequest::getCmd('view', 'install');
     $vFormat = $document->getType();
     $lName = JRequest::getCmd('layout', 'default');
     // Get and render the view.
     if ($view = $this->getView($vName, $vFormat)) {
         $ftp = JClientHelper::setCredentialsFromRequest('ftp');
         $view->assignRef('ftp', $ftp);
         // Get the model for the view.
         $model = $this->getModel($vName);
         // Push the model into the view (as default).
         $view->setModel($model, true);
         $view->setLayout($lName);
         // Push document object into the view.
         $view->assignRef('document', $document);
         // Load the submenu.
         InstallerHelper::addSubmenu($vName);
         $view->display();
     }
     return $this;
 }
开发者ID:Simarpreet05,项目名称:joomla,代码行数:35,代码来源:controller.php

示例2: uninstall

 function uninstall()
 {
     JSNFactory::import('components.com_installer.helpers.installer');
     $canDo = InstallerHelper::getActions();
     if (!$canDo->get('core.delete')) {
         $response = array('isUninstalled' => false);
         echo json_encode($response);
         jexit();
     }
     $id = JRequest::getVar('id', 0);
     if (!is_numeric($id) || $id <= 0) {
         return;
     }
     $dbo = JFactory::getDBO();
     $dbo->setQuery("SELECT e.extension_id FROM #__extensions e INNER JOIN #__template_styles s ON e.element=s.template WHERE e.type='template' AND s.id={$id} LIMIT 1");
     $extensionId = $dbo->loadResult();
     if ($extensionId > 0) {
         JFactory::getLanguage()->load('com_installer');
         JSNFactory::import('components.com_installer.models.manage');
         $model = $this->getModel('manage', 'InstallerModel', array('ignore_request' => true));
         $result = $model->remove(array($extensionId));
         $response = array('isUninstalled' => true);
         echo json_encode($response);
     }
     jexit();
 }
开发者ID:kleinhelmi,项目名称:tus03_j3_2015_01,代码行数:26,代码来源:templates.php

示例3: installPaExtension

 public function installPaExtension()
 {
     $this->model = $this->getModel('installer');
     JSNFactory::import('components.com_installer.helpers.installer');
     $canDo = InstallerHelper::getActions();
     if ($canDo->get('core.manage')) {
         try {
             $rs = $this->model->download();
             $this->input->set('package', $rs);
             // Set extension parameters
             $_GET['package'] = $rs;
             $_GET['type'] = 'plugin';
             $_GET['folder'] = 'jsnpoweradmin';
             $_GET['publish'] = 1;
             $_GET['client'] = 'site';
             $_GET['name'] = str_ireplace(JSN_POWERADMIN_EXT_IDENTIFIED_NAME_PREFIX, '', $_GET['identified_name']);
             $this->model->install($rs);
             if ($this->model->install($rs)) {
                 require_once JPATH_COMPONENT_ADMINISTRATOR . '/helpers/extensions.php';
                 // Enable extension suport
                 $_GET['name'] = str_ireplace(JSN_POWERADMIN_EXT_IDENTIFIED_NAME_PREFIX, '', $_GET['identified_name']);
                 try {
                     JSNPaExtensionsHelper::enableExt($identifiedName);
                 } catch (Exception $ex) {
                     exit('notenabled');
                 }
             }
         } catch (Exception $ex) {
             exit($ex->getMessage());
         }
         exit('success');
     }
 }
开发者ID:NallelyFlores89,项目名称:basvec,代码行数:33,代码来源:installer.php

示例4: display

 /**
  * Method to display a view.
  *
  * @param   boolean  $cachable   If true, the view output will be cached
  * @param   array    $urlparams  An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return  JController  This object to support chaining.
  *
  * @since   1.5
  */
 public function display($cachable = false, $urlparams = false)
 {
     require_once JPATH_ADMINISTRATOR . '/components/com_installer/helpers/installer.php';
     // Get the document object.
     $document = JFactory::getDocument();
     // Set the default view name and format from the Request.
     $vName = $this->input->get('view', 'install');
     $vFormat = $document->getType();
     $lName = $this->input->get('layout', 'default', 'string');
     // Get and render the view.
     if ($view = $this->getView($vName, $vFormat)) {
         $ftp = JClientHelper::setCredentialsFromRequest('ftp');
         $view->ftp =& $ftp;
         // Get the model for the view.
         $model = $this->getModel($vName);
         // Push the model into the view (as default).
         $view->setModel($model, true);
         $view->setLayout($lName);
         // Push document object into the view.
         $view->document = $document;
         // Load the submenu.
         InstallerHelper::addSubmenu($vName);
         $view->display();
     }
     return $this;
 }
开发者ID:TFToto,项目名称:playjoom-builds,代码行数:36,代码来源:controller.php

示例5: onGetIcons

 /**
  * This method is called when the Quick Icons module is constructing its set
  * of icons. You can return an array which defines a single icon and it will
  * be rendered right after the stock Quick Icons.
  *
  * @param   string  $context  The calling context
  *
  * @return  array  A list of icon definition associative arrays, consisting of the
  *                 keys link, image, text and access.
  *
  * @since   2.5
  */
 public function onGetIcons($context)
 {
     //Load helper methods
     require_once JPATH_ADMINISTRATOR . '/components/com_playjoomupdate/helpers/playjoomupdate.php';
     require_once JPATH_ADMINISTRATOR . '/components/com_playjoomupdate/helpers/pjversion.php';
     // Define the Joomla version if not already defined.
     if (!defined('PJVERSION')) {
         $jversion = new PJVersion();
         define('PJVERSION', $jversion->getShortVersion());
     }
     if (!class_exists('InstallerHelper')) {
         require_once JPATH_ADMINISTRATOR . '/components/com_installer/helpers/installer.php';
     }
     $this->UpdateConf = InstallerHelper::getConfig('Update', JPATH_ADMINISTRATOR . '/components/com_playjoomupdate/playjoomupdate.conf.php');
     $PJ_Extension_ID = $this->UpdateConf->get('PJUpdate_extension_id');
     if ($context != $this->params->get('context', 'mod_pj_quickicon') || !JFactory::getUser()->authorise('core.manage', 'com_installer')) {
         return;
     }
     JHtml::_('jquery.framework');
     $cur_template = JFactory::getApplication()->getTemplate();
     $url = JUri::base() . 'index.php?option=com_playjoomupdate';
     $ajax_url = JUri::base() . 'index.php?option=com_installer&view=update&task=update.ajax';
     $script = array();
     $script[] = 'var plg_quickicon_playjoomupdate_url = \'' . $url . '\';';
     $script[] = 'var plg_quickicon_playjoomupdate_ajax_url = \'' . $ajax_url . '\';';
     $script[] = 'var plg_quickicon_playjoomupdatecheck_pjversion = \'' . PJVERSION . '\'';
     $script[] = 'var plg_quickicon_playjoomupdatecheck_pjextensionid = \'' . $PJ_Extension_ID . '\'';
     $script[] = 'var plg_quickicon_playjoomupdate_text = {' . '"UPTODATE" : "' . JText::_('PLG_QUICKICON_JOOMLAUPDATE_UPTODATE', true) . '",' . '"UPDATEFOUND": "' . JText::_('PLG_QUICKICON_JOOMLAUPDATE_UPDATEFOUND', true) . '",' . '"UPDATEFOUND_MESSAGE": "' . JText::_('PLG_QUICKICON_JOOMLAUPDATE_UPDATEFOUND_MESSAGE', true) . '",' . '"UPDATEFOUND_BUTTON": "' . JText::_('PLG_QUICKICON_JOOMLAUPDATE_UPDATEFOUND_BUTTON', true) . '",' . '"ERROR": "' . JText::_('PLG_QUICKICON_JOOMLAUPDATE_ERROR', true) . '",' . '};';
     $script[] = 'var plg_quickicon_playjoomupdate_img = {' . '"UPTODATE" : "' . JUri::base(true) . '/templates/' . $cur_template . '/images/header/icon-48-jupdate-uptodate.png",' . '"UPDATEFOUND": "' . JUri::base(true) . '/templates/' . $cur_template . '/images/header/icon-48-jupdate-updatefound.png",' . '"ERROR": "' . JUri::base(true) . '/templates/' . $cur_template . '/images/header/icon-48-deny.png",' . '};';
     //load javascripts
     $document = JFactory::getDocument();
     $document->addScriptDeclaration(implode("\n", $script));
     $document->addScript(JURI::root(true) . '/plugins/quickicon/playjoomupdate/js/pj_update_checker.js', 'text/javascript', true, false);
     return array(array('link' => 'index.php?option=com_playjoomupdate', 'image' => 'fa fa-download', 'icon' => 'header/icon-48-download.png', 'text' => JText::_('PLG_QUICKICON_JOOMLAUPDATE_CHECKING'), 'id' => 'plg_quickicon_joomlaupdate', 'group' => 'MOD_QUICKICON_MAINTENANCE'));
 }
开发者ID:TFToto,项目名称:playjoom-builds,代码行数:47,代码来源:playjoomupdate.php

示例6: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $canDo = InstallerHelper::getActions();
     JToolBarHelper::custom('update.update', 'upload', 'upload', 'COM_INSTALLER_TOOLBAR_UPDATE', true, false);
     JToolBarHelper::custom('update.find', 'refresh', 'refresh', 'COM_INSTALLER_TOOLBAR_FIND_UPDATES', false, false);
     JToolBarHelper::custom('update.purge', 'purge', 'purge', 'JTOOLBAR_PURGE_CACHE', false, false);
     JToolBarHelper::divider();
     parent::addToolbar();
     JToolBarHelper::help('JHELP_EXTENSIONS_EXTENSION_MANAGER_UPDATE');
 }
开发者ID:jimyb3,项目名称:mathematicalteachingsite,代码行数:15,代码来源:view.html.php

示例7: __construct

 /**
  * Constructor.
  *
  * @param   array  $config  An optional associative array of configuration settings.
  *
  * @see     JController
  * @since   1.6
  */
 public function __construct($config = array())
 {
     if (empty($config['filter_fields'])) {
         $config['filter_fields'] = array('name', 'client_id', 'type', 'folder', 'extension_id', 'update_id', 'update_site_id');
     }
     if (!class_exists('InstallerHelper')) {
         require_once JPATH_ADMINISTRATOR . '/components/com_installer/helpers/installer.php';
     }
     $this->UpdateConf = InstallerHelper::getConfig('Update', JPATH_ADMINISTRATOR . '/components/com_playjoomupdate/playjoomupdate.conf.php');
     parent::__construct($config);
 }
开发者ID:TFToto,项目名称:playjoom-builds,代码行数:19,代码来源:update.php

示例8: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $canDo = InstallerHelper::getActions();
     /*
      * Set toolbar items for the page
      */
     JToolBarHelper::custom('database.fix', 'refresh', 'refresh', 'COM_INSTALLER_TOOLBAR_DATABASE_FIX', false, false);
     JToolBarHelper::divider();
     parent::addToolbar();
     JToolBarHelper::help('JHELP_EXTENSIONS_EXTENSION_MANAGER_DATABASE');
 }
开发者ID:networksoft,项目名称:seekerplus2.com,代码行数:16,代码来源:view.html.php

示例9: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $canDo = InstallerHelper::getActions();
     /*
      * Set toolbar items for the page
      */
     JToolbarHelper::custom('discover.install', 'upload', 'upload', 'JTOOLBAR_INSTALL', true, false);
     JToolbarHelper::custom('discover.refresh', 'refresh', 'refresh', 'COM_INSTALLER_TOOLBAR_DISCOVER', false, false);
     JToolbarHelper::divider();
     parent::addToolbar();
     JToolbarHelper::help('JHELP_EXTENSIONS_EXTENSION_MANAGER_DISCOVER');
 }
开发者ID:GitIPFire,项目名称:Homeworks,代码行数:19,代码来源:view.html.php

示例10: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $canDo = InstallerHelper::getActions();
     JToolBarHelper::title(JText::_('COM_INSTALLER_HEADER_' . $this->getName()), 'install.png');
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_installer');
         JToolBarHelper::divider();
     }
     // Document
     $document = JFactory::getDocument();
     $document->setTitle(JText::_('COM_INSTALLER_TITLE_' . $this->getName()));
 }
开发者ID:carmerin,项目名称:cesae-web,代码行数:17,代码来源:view.php

示例11: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     JToolbarHelper::custom('update.update', 'upload', 'upload', 'COM_INSTALLER_TOOLBAR_UPDATE', true, false);
     JToolbarHelper::custom('update.find', 'refresh', 'refresh', 'COM_INSTALLER_TOOLBAR_FIND_UPDATES', false, false);
     JToolbarHelper::divider();
     JToolbarHelper::help('JHELP_EXTENSIONS_EXTENSION_MANAGER_UPDATE');
     JHtmlSidebar::setAction('index.php?option=com_installer&view=manage');
     JHtmlSidebar::addFilter(JText::_('COM_INSTALLER_VALUE_CLIENT_SELECT'), 'filter_client_id', JHtml::_('select.options', array('0' => 'JSITE', '1' => 'JADMINISTRATOR'), 'value', 'text', $this->state->get('filter.client_id'), true));
     JHtmlSidebar::addFilter(JText::_('COM_INSTALLER_VALUE_TYPE_SELECT'), 'filter_type', JHtml::_('select.options', InstallerHelper::getExtensionTypes(), 'value', 'text', $this->state->get('filter.type'), true));
     JHtmlSidebar::addFilter(JText::_('COM_INSTALLER_VALUE_FOLDER_SELECT'), 'filter_group', JHtml::_('select.options', array_merge(InstallerHelper::getExtensionGroupes(), array('*' => JText::_('COM_INSTALLER_VALUE_FOLDER_NONAPPLICABLE'))), 'value', 'text', $this->state->get('filter.group'), true));
     parent::addToolbar();
 }
开发者ID:WineWorld,项目名称:joomlatrialcmbg,代码行数:19,代码来源:view.html.php

示例12: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	2.5
  */
 protected function addToolbar()
 {
     $canDo = InstallerHelper::getActions();
     JToolBarHelper::custom('site.install', 'upload', 'upload', 'JTOOLBAR_INSTALL', true, false);
     JToolBarHelper::custom('site.find', 'refresh', 'refresh', 'COM_INSTALLER_TOOLBAR_FIND_EXTENSIONS', false, false);
     JToolBarHelper::custom('site.purge', 'purge', 'purge', 'JTOOLBAR_PURGE_CACHE', false, false);
     JToolBarHelper::divider();
     parent::addToolbar();
     JToolBarHelper::help('JHELP_EXTENSIONS_EXTENSION_MANAGER_UPDATE');
     JToolBarHelper::title(JText::sprintf('COM_INSTALLER_TITLE_SITE', $this->distro->name), 'install');
     $document = JFactory::getDocument();
     $document->setTitle(JText::sprintf('COM_INSTALLER_TITLE_' . $this->getName(), $this->distro->name));
 }
开发者ID:rdeutz,项目名称:square-one-cms,代码行数:18,代码来源:view.html.php

示例13: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @return void
  */
 protected function addToolbar()
 {
     $canDo = InstallerHelper::getActions();
     JToolBarHelper::title(JText::_('COM_INSTALLER_HEADER_' . $this->getName()), 'install.png');
     if ($canDo->get('core.admin')) {
         JToolBarHelper::custom('languages.install', 'upload', 'upload', 'COM_INSTALLER_TOOLBAR_INSTALL', true, false);
         JToolBarHelper::custom('languages.find', 'refresh', 'refresh', 'COM_INSTALLER_TOOLBAR_FIND_LANGUAGES', false, false);
         JToolBarHelper::divider();
         parent::addToolbar();
         // TODO: this help screen will need to be created
         JToolBarHelper::help('JHELP_EXTENSIONS_EXTENSION_MANAGER_LANGUAGES');
     }
 }
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:18,代码来源:view.html.php

示例14: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   3.4
  */
 protected function addToolbar()
 {
     $canDo = JHelperContent::getActions('com_installer');
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publish('updatesites.publish', 'JTOOLBAR_ENABLE', true);
         JToolbarHelper::unpublish('updatesites.unpublish', 'JTOOLBAR_DISABLE', true);
         JToolbarHelper::divider();
     }
     JHtmlSidebar::setAction('index.php?option=com_installer&view=updatesites');
     JHtmlSidebar::addFilter(JText::_('COM_INSTALLER_VALUE_CLIENT_SELECT'), 'filter_client_id', JHtml::_('select.options', array('0' => 'JSITE', '1' => 'JADMINISTRATOR'), 'value', 'text', $this->state->get('filter.client_id'), true));
     JHtmlSidebar::addFilter(JText::_('COM_INSTALLER_VALUE_STATE_SELECT'), 'filter_enabled', JHtml::_('select.options', array('0' => 'JDISABLED', '1' => 'JENABLED'), 'value', 'text', $this->state->get('filter.enabled'), true));
     JHtmlSidebar::addFilter(JText::_('COM_INSTALLER_VALUE_TYPE_SELECT'), 'filter_type', JHtml::_('select.options', InstallerHelper::getExtensionTypes(), 'value', 'text', $this->state->get('filter.type'), true));
     JHtmlSidebar::addFilter(JText::_('COM_INSTALLER_VALUE_FOLDER_SELECT'), 'filter_group', JHtml::_('select.options', array_merge(InstallerHelper::getExtensionGroupes(), array('*' => JText::_('COM_INSTALLER_VALUE_FOLDER_NONAPPLICABLE'))), 'value', 'text', $this->state->get('filter.group'), true));
     parent::addToolbar();
     JToolbarHelper::help('JHELP_EXTENSIONS_EXTENSION_MANAGER_UPDATESITES');
 }
开发者ID:rhellyer,项目名称:joomla-cms,代码行数:23,代码来源:view.html.php

示例15: _addToolbar16

	private function _addToolbar16()
	{
		$canDo	= InstallerHelper::getActions();
		JToolBarHelper::title(JText::_('COM_INSTALLER_HEADER_INSTALL'), 'install.png');

		if ($canDo->get('core.admin')) {
			JToolBarHelper::preferences('com_installer');
			JToolBarHelper::divider();
		}

		// Document
		$document = JFactory::getDocument();
		$document->setTitle(JText::_('COM_INSTALLER_HEADER_INSTALL'));
		
		JToolBarHelper::help('JHELP_EXTENSIONS_EXTENSION_MANAGER_INSTALL');
	}
开发者ID:rkern21,项目名称:videoeditor,代码行数:16,代码来源:view.html.php


注:本文中的InstallerHelper类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。