CoreFiles by mySites.guru
WorkflowTransitionEvent.php61 lines, 1,175 bytes, from Joomla_4.0.0-beta1-Beta-Full_Package.zip
Raw History Compare with 3.9.0-beta4
md5
8035fa7ea8d120003da1d01549516bd6
sha1
63859eab55a8a0c59206d30a6a29a32ff8d64918
sha256
dad53d313ac334451ac69d9f7571f16b0832b5c0b4b8a01dfc5f044127812890
<?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;
use Joomla\CMS\Event\AbstractImmutableEvent;
use function explode;

/**
 * Event class for Workflow Functionality Used events
 *
 * @since  4.0.0
 */
class WorkflowTransitionEvent 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['stopTransition'] = 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 setStopTransition($value = true)
	{
		$this->arguments['stopTransition'] = $value;

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


}

No other release has this exact content. See every version of this file.