-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7ffcf2c
commit 43093dd
Showing
3 changed files
with
143 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
/** | ||
* @package Quantummanagericon | ||
* | ||
* @author Cymbal <[email protected]> | ||
* @copyright Copyright (C) 2019 "Delo Design". All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
* @link https://delo-design.ru | ||
*/ | ||
|
||
defined('_JEXEC') or die('Restricted access'); | ||
?> | ||
|
||
<?php | ||
|
||
/** | ||
* Class plgQuickiconQuantummanagericon | ||
*/ | ||
class plgQuickiconQuantummanagericon extends JPlugin | ||
{ | ||
|
||
public function onGetIcons($context) | ||
{ | ||
|
||
if ($context !== $this->params->get('context', 'mod_quickicon') || !JFactory::getUser()->authorise('core.manage', 'com_quantummanager')) | ||
{ | ||
return; | ||
} | ||
|
||
return array( | ||
array( | ||
'link' => 'index.php?option=com_quantummanager', | ||
'image' => 'pictures', | ||
'text' => 'Quantum Manager', | ||
'id' => 'plg_quickicon_quantummanageicon', | ||
) | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<extension version="2.5" type="plugin" group="quickicon"> | ||
<name>Quantum Manager Quick Icon</name> | ||
<creationDate>30.06.2018</creationDate> | ||
<version>1.0</version> | ||
<author>Cymbal</author> | ||
<authorEmail>[email protected]</authorEmail> | ||
<authorUrl>https://delo-design.ru</authorUrl> | ||
<copyright>Copyright (C) 2019 "Delo Design". All rights reserved.</copyright> | ||
<license>GNU General Public License version 2 or later; see LICENSE.txt</license> | ||
<description>Quantum Manager Quick Icon</description> | ||
|
||
<scriptfile>script.php</scriptfile> | ||
|
||
<files> | ||
<filename plugin="quantummanagericon">quantummanagericon.php</filename> | ||
</files> | ||
|
||
<config> | ||
<fields name="params"> | ||
<fieldset name="basic"> | ||
<field name="context" type="text" default="mod_quickicon" description="QUICKICON_GROUP" label="GROUP" /> | ||
<field name="displayedtext" type="text" default="" description="ICON_LEGEND" label="ICON_LEGEND" /> | ||
</fieldset> | ||
</fields> | ||
</config> | ||
</extension> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<?php | ||
/** | ||
* @package quantummanagermedia | ||
* | ||
* @author tsymb <[email protected]> | ||
* @copyright A copyright | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
* @link http://your.url.com | ||
*/ | ||
|
||
defined('_JEXEC') or die; | ||
|
||
/** | ||
* Quantummanagermedia script file. | ||
* | ||
* @package A package name | ||
* @since 1.0 | ||
*/ | ||
class plgQuickiconQuantummanagericonInstallerScript | ||
{ | ||
/** | ||
* Constructor | ||
* | ||
* @param JAdapterInstance $adapter The object responsible for running this script | ||
*/ | ||
public function __construct(JAdapterInstance $adapter) {} | ||
|
||
/** | ||
* Called before any type of action | ||
* | ||
* @param string $route Which action is happening (install|uninstall|discover_install|update) | ||
* @param JAdapterInstance $adapter The object responsible for running this script | ||
* | ||
* @return boolean True on success | ||
*/ | ||
public function preflight($route, JAdapterInstance $adapter) {} | ||
|
||
/** | ||
* Called after any type of action | ||
* | ||
* @param string $route Which action is happening (install|uninstall|discover_install|update) | ||
* @param JAdapterInstance $adapter The object responsible for running this script | ||
* | ||
* @return boolean True on success | ||
*/ | ||
public function postflight($route, JAdapterInstance $adapter) { | ||
$db = JFactory::getDbo(); | ||
$query = $db->getQuery( true ); | ||
$query->update( '#__extensions' )->set( 'enabled=1' )->where( 'type=' . $db->q( 'plugin' ) )->where( 'element=' . $db->q( 'quantummanagericon' ) ); | ||
$db->setQuery( $query )->execute(); | ||
} | ||
|
||
/** | ||
* Called on installation | ||
* | ||
* @param JAdapterInstance $adapter The object responsible for running this script | ||
* | ||
* @return boolean True on success | ||
*/ | ||
public function install(JAdapterInstance $adapter) {} | ||
|
||
/** | ||
* Called on update | ||
* | ||
* @param JAdapterInstance $adapter The object responsible for running this script | ||
* | ||
* @return boolean True on success | ||
*/ | ||
public function update(JAdapterInstance $adapter) {} | ||
|
||
/** | ||
* Called on uninstallation | ||
* | ||
* @param JAdapterInstance $adapter The object responsible for running this script | ||
*/ | ||
public function uninstall(JAdapterInstance $adapter) {} | ||
} |