CoreFiles by mySites.guru
WorkflowTransitionEvent.php57 lines, 1,256 bytes, from Joomla_4.4.13-Stable-Full_Package.zip
Raw History Compare with 4.4.12
md5
61de4bccf9baf8be92b63fdfc684c654
sha1
4f96568e1665f7fa34d348d7d5d2b10b71c9e1d1
sha256
35cb3c8b7b71f7eb299a3c5a48dcf31dd66f6c3ee0679a198934418a5ec074cc
<?php

/**
 * Joomla! Content Management System
 *
 * @copyright  (C) 2020 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\CMS\Event\Workflow;

// phpcs:disable PSR1.Files.SideEffects
\defined('JPATH_PLATFORM') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * 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 = [])
    {
        $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();
        }
    }
}

The same content is in 35 releases, Joomla 4.4.0-alpha3 to 4.4.14. See them all, or every version of this file.