Skip to main content
1 vote
Accepted

Joomla 4 / 5 - Custom Field Plugin

You need to register namespace for field class lookup: \Joomla\CMS\Form\FormHelper::addFieldPrefix('NXD\\Plugin\\Fields\\NXDFolderList\\Field'); And also fix capitalization of field type. It is ...
Sharky's user avatar
  • 11.3k
1 vote
Accepted

How to set and use a global variable within a content plugin?

Normally plugins in Joomla are instantiated only once per request. So using a class member variable is the cleanest solution: use Joomla\CMS\Event\Content\ContentPrepareEvent; use Joomla\CMS\Plugin\...
Sharky's user avatar
  • 11.3k
1 vote
Accepted

Scheduled Task - Plugin to use Rules

Apparently, the entire task object is passed to the event but there is no proper method for retrieving it. So you have to resort to using getArgument(): $rules = $event->getArgument('subject')->...
Sharky's user avatar
  • 11.3k
1 vote

Scheduled Task - Plugin to use Rules

Looking at the code in /administrator/components/com_scheduler/src/Task/Task.php the execution_rules aren't included in the event. So going from the code there: $event = AbstractEvent::create( '...
Robbie Jackson's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible