CoreFiles by mySites.guru
WorkflowFunctionalityUsedEvent.php57 lines, 1,083 bytes, from Joomla_4.0.0-beta5-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta4
md5
8c475c0a7073d6186da4ddd6191ec0c8
sha1
4ca0ff1d2e07fa3d44d45da6527e33ecc4802fb6
sha256
211cf10786f75c68f05cba701b330dbc4b5f28bc90d48b96154ce7fb593c5120
<?php
/**
 * Joomla! Content Management System
 *
 * @copyright  Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */

namespace Joomla\CMS\Event\Workflow;

\defined('JPATH_PLATFORM') or die;

use BadMethodCallException;

/**
 * Event class for Workflow Functionality Used events
 *
 * @since  4.0.0
 */
class WorkflowFunctionalityUsedEvent extends AbstractEvent
{
	/**
	 * Constructor.
	 *
	 * @param   string  $name       The event name.
	 * @param   array   $arguments  The event arguments.
	 *
	 * @throws  BadMethodCallException
	 *
	 * @since   4.0.0
	 */
	public function __construct($name, array $arguments = array())
	{
		$arguments['used'] = false;

		parent::__construct($name, $arguments);
	}

	/**
	 * Set used parameter to true
	 *
	 * @param   bool  $value  The value to set
	 *
	 * @return void
	 *
	 * @since   4.0.0
	 */
	public function setUsed($value = true)
	{
		$this->arguments['used'] = $value;

		if ($value === true)
		{
			$this->stopPropagation();
		}
	}
}

The same content is in 4 releases, Joomla 4.0.0-beta2 to 4.0.0-beta5. See them all, or every version of this file.