CoreFiles by mySites.guru
BeforeCheckinEvent.php45 lines, 1,173 bytes, from Joomla_4.2.3-Stable-Full_Package.zip
Raw History Compare with 4.2.2
md5
e6adcc48dfc5f8c2a65c88b129ad1ac2
sha1
6828a91a2a8707ea3aa4f5feb069f6947c3e0b19
sha256
75bde036448fe1517f26dc3b37a7355afd6ca08a6935e3e9e114b964828dec9a
<?php

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

namespace Joomla\CMS\Event\Table;

use BadMethodCallException;

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

/**
 * Event class for JTable's onBeforeCheckin event
 *
 * @since  4.0.0
 */
class BeforeCheckinEvent extends AbstractEvent
{
    /**
     * Constructor.
     *
     * Mandatory arguments:
     * subject      JTableInterface The table we are operating on
     * pk           mixed           An optional primary key value to check out.
     *
     * @param   string  $name       The event name.
     * @param   array   $arguments  The event arguments.
     *
     * @throws  BadMethodCallException
     */
    public function __construct($name, array $arguments = array())
    {
        if (!\array_key_exists('pk', $arguments)) {
            throw new BadMethodCallException("Argument 'pk' is required for event $name");
        }

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

The same content is in 11 releases, Joomla 4.2.1 to 4.3.0-alpha2. See them all, or every version of this file.