Skip to content

Commit

Permalink
onChangeState for Extension Manager
Browse files Browse the repository at this point in the history
PR for #13278

Adds a trigger event so that you can capture when an extensin is disabled etc

To test
Apply this PR

and then in plugins\extension\joomla\joomla.php
add this code for testing

	public function onExtensionChangeState($context, $eid, $value)
	{
		die ('caught you');
	}

Now try to disable an extension in the manage screen and you should catch the event and the messaage is displayed
  • Loading branch information
brianteeman committed Aug 18, 2018
1 parent aed17e0 commit 2c98401
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions administrator/components/com_installer/models/manage.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ public function publish(&$eid = array(), $value = 1)
{
$table->enabled = $value;
}

$context = $this->option . '.' . $this->name;
JPluginHelper::importPlugin('extension');
JEventDispatcher::getInstance()->trigger('onExtensionChangeState', array($context, $eid, $value));

if (!$table->store())
{
Expand Down

0 comments on commit 2c98401

Please sign in to comment.