Other

Events that does not have a specific context.

onOpenGraphPrepare

/**
 * Triggered on Open Graph data preparation for contest, entry or category (view).
 *
 * @param   string  $context   Event context.
 * @param   object  $item      Item: contest, entry or category.
 * @param   object  $ogObject  Object with Open Graph data.
 * @param   array   $options   Array of additional options like Twitter card types.
 */
public function onOpenGraphPrepare($context, $item, $ogObject, &$options)
{
	if ($context != 'com_competition.competition'
		&& $context != 'com_competition.participant'
		&& $context != 'com_competition.category'
		|| !\Joomla\CMS\Factory::getApplication()->app->isClient('site'))
	{
		return;
	}

	$ogObject->title = empty($item->title) ? $context : $item->title . ' - ' . $context;
	$ogObject->description   = 'onOpenGraphPrepare is working fine';
	$options['twitter_card'] = 'summary_large_image';
}

onSaveRedirect

onUserAuthorise

The event can be triggered anywhere in the component and allows the plugins to override JUser::authorise result in case it is not true. If the plugin returns true then action is allowed. Currently plugins can override only core.vote and core.unvote actions.

Last updated