script.php * * @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt */ class plgSystemMiniorangeimportexportusersInstallerScript { /** * This method is called after a component is installed. * * @param \stdClass $parent - Parent object calling this method. * * @return void */ public function install($parent) { $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->update('#__extensions'); $query->set($db->quoteName('enabled') . ' = 1'); $query->where($db->quoteName('element') . ' = ' . $db->quote('miniorangeimportexportusers')); $query->where($db->quoteName('type') . ' = ' . $db->quote('plugin')); $db->setQuery($query); $db->execute(); } /** * This method is called after a component is uninstalled. * * @param \stdClass $parent - Parent object calling this method. * * @return void */ public function uninstall($parent) { //echo '

' . JText::_('COM_HELLOWORLD_UNINSTALL_TEXT') . '

'; } /** * This method is called after a component is updated. * * @param \stdClass $parent - Parent object calling object. * * @return void */ public function update($parent) { //echo '

' . JText::sprintf('COM_HELLOWORLD_UPDATE_TEXT', $parent->get('manifest')->version) . '

'; } /** * Runs just before any installation action is performed on the component. * Verifications and pre-requisites should run in this function. * * @param string $type - Type of PreFlight action. Possible values are: * - * install * - * update * - * discover_install * @param \stdClass $parent - Parent object calling object. * * @return void */ public function preflight($type, $parent) { //echo '

' . JText::_('COM_HELLOWORLD_PREFLIGHT_' . $type . '_TEXT') . '

'; } /** * Runs right after any installation action is performed on the component. * * @param string $type - Type of PostFlight action. Possible values are: * - * install * - * update * - * discover_install * @param \stdClass $parent - Parent object calling object. * * @return void */ function postflight($type, $parent) { // echo '

' . JText::_('COM_HELLOWORLD_POSTFLIGHT_' . $type . '_TEXT') . '

'; } }