/**
* Constructor.
*
* Mandatory arguments:
* subject JTableInterface The table we are operating on
* pks mixed An optional array of primary key values to update.
* state int The publishing state. eg. [0 = unpublished, 1 = published]
* userId int The user id of the user performing the operation.
*
* @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('pks', $arguments)) {
throw new BadMethodCallException("Argument 'pks' is required for event {$name}");
}
if (!\array_key_exists('state', $arguments)) {
throw new BadMethodCallException("Argument 'state' is required for event {$name}");
}
if (!\array_key_exists('userId', $arguments)) {
throw new BadMethodCallException("Argument 'userId' is required for event {$name}");
}
parent::__construct($name, $arguments);
}