/** * This method executes the event onContentAfterSave. * * @param CrowdfundingTableProject $table * @param string $step * @param bool $isNew * * @throws Exception */ protected function triggerEventAfterSave($table, $step, $isNew = false) { // Get properties $project = $table->getProperties(); $project = Joomla\Utilities\ArrayHelper::toObject($project); // Generate context $context = $this->option . '.' . $step; // Include the content plugins for the change of state event. $dispatcher = JEventDispatcher::getInstance(); JPluginHelper::importPlugin('content'); // Trigger the onContentAfterSave event. $results = $dispatcher->trigger("onContentAfterSave", array($context, &$project, $isNew)); if (in_array(false, $results, true)) { throw new RuntimeException(JText::_("COM_CROWDFUNDING_ERROR_DURING_PROJECT_CREATING_PROCESS")); } }