* list.
*
* @param DatabaseObjectList $objectList
+ * @throws \InvalidArgumentException if given object list cannot be handled by the action
*/
public function executeAction(DatabaseObjectList $objectList);
* @inheritDoc
*/
public function executeAction(DatabaseObjectList $objectList) {
- if (!($objectList instanceof UserList)) return;
+ if (!($objectList instanceof UserList)) {
+ throw new \InvalidArgumentException("Object list is no instance of '".UserList::class."', instance of '".get_class($objectList)."' given.");
+ }
$users = $this->getAccessibleUsers($objectList);
* @inheritDoc
*/
public function executeAction(DatabaseObjectList $objectList) {
- if (!($objectList instanceof UserList)) return;
+ if (!($objectList instanceof UserList)) {
+ throw new \InvalidArgumentException("Object list is no instance of '".UserList::class."', instance of '".get_class($objectList)."' given.");
+ }
$users = $this->getAccessibleUsers($objectList);
* @inheritDoc
*/
public function executeAction(DatabaseObjectList $objectList) {
- if (!($objectList instanceof UserList)) return;
+ if (!($objectList instanceof UserList)) {
+ throw new \InvalidArgumentException("Object list is no instance of '".UserList::class."', instance of '".get_class($objectList)."' given.");
+ }
// send content type
header('Content-Type: text/'.$this->fileType.'; charset=UTF-8');
* @inheritDoc
*/
public function executeAction(DatabaseObjectList $objectList) {
- if (!($objectList instanceof UserList)) return;
+ if (!($objectList instanceof UserList)) {
+ throw new \InvalidArgumentException("Object list is no instance of '".UserList::class."', instance of '".get_class($objectList)."' given.");
+ }
if (count($objectList)) {
// save config in session