- md5
- dc9fc7f79d7eea2da354fe5ac91624ce
- sha1
- 6effcf85013f900c923bcd7d68f6e12a38c29de7
- sha256
- d9f8567b9d23e678505187c8279ed01c50733d33bbb375d1c571be6a14a42504
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
<?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 onAfterStore event
*
* @since 4.0.0
*/
class AfterStoreEvent extends AbstractEvent
{
/**
* Constructor.
*
* Mandatory arguments:
* subject JTableInterface The table we are operating on
* result boolean Did the save succeed?
*
* @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('result', $arguments)) {
throw new BadMethodCallException("Argument 'result' is required for event $name");
}
parent::__construct($name, $arguments);
}
/**
* Setter for the result argument
*
* @param boolean $value The value to set
*
* @return boolean
*
* @throws BadMethodCallException if the argument is not of the expected type
*/
protected function setResult($value)
{
return $value ? true : false;
}
}
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.