CoreFiles by mySites.guru
WorkflowFunctionalityUsedEvent.php57 lines, 1,225 bytes, from Joomla_5.4.2-Stable-Full_Package.zip
Raw History Compare with 5.4.1
md5
98106454445b5513ea7c8da52557fdb1
sha1
5fdec2cfd1573ac758df34b1666c9b02d299d0c8
sha256
ff064e64721ef6c2b058480f80a66922a3e821240eaa77ccf122c9bda8f85739
<?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('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * 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 = [])
    {
        $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 153 releases, Joomla 5.0.0-alpha3 to 6.2.1-rc1. See them all, or every version of this file.