CoreFiles by mySites.guru
BeforeDeleteEvent.php41 lines, 1,037 bytes, from Joomla_4.2.0-Stable-Full_Package.zip
Raw History Compare with 4.1.5
md5
a60be6f184714c16a763970cc9abbd34
sha1
0c25e77d730c146fba79d7c0dfef5668c01826cb
sha256
1baffb9ff3a8e5314fce25fea53f5b3668986e44c046fef2758eae3a822f5a76
<?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;

/**
 * Event class for JTable's onBeforeDelete event
 *
 * @since  4.0.0
 */
class BeforeDeleteEvent extends AbstractEvent
{
    /**
     * Constructor.
     *
     * Mandatory arguments:
     * subject      JTableInterface The table we are operating on
     * pk           An optional primary key value to delete.
     *
     * @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 5 releases, Joomla 4.2.0-beta3 to 4.2.1-rc2. See them all, or every version of this file.