CoreFiles by mySites.guru
BeforeBatchEvent.php44 lines, 1,144 bytes, from Joomla_4.2.0-Stable-Full_Package.zip
Raw History Compare with 4.1.5
md5
aa7fee1b2a301bda6cf0b1d653389afd
sha1
9b85fa48cfd72a1b50ec2e25e50ed5fc2afc1839
sha256
315c5b0fe1edbc0524e4b712cf1defe7fe9f6287f2937db61e1e61c3c9a497da
<?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
 */

namespace Joomla\CMS\Event\Model;

use BadMethodCallException;
use Joomla\CMS\Event\AbstractImmutableEvent;

/**
 * Event class for modifying a table object before a batch event is applied
 *
 * @since  4.0.0
 */
class BeforeBatchEvent extends AbstractImmutableEvent
{
    /**
     * 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())
    {
        if (!\array_key_exists('src', $arguments)) {
            throw new BadMethodCallException("Argument 'src' is required for event $name");
        }

        if (!\array_key_exists('type', $arguments)) {
            throw new BadMethodCallException("Argument 'type' is required for event $name");
        }

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

The same content is in 5 releases, Joomla 4.2.0-beta3 to 4.2.1-rc2. See them all, or every version of this file.