protected function getBatchActionResponse($actionFunction, array $selectedIds)
    {
        $response = $this->getIndexRedirectionResponse();

        $successfullyUsedIds = array();
        foreach ($selectedIds as $id) {
            try {
                call_user_func($actionFunction, $id);
                $successfullyUsedIds[] = $id;
            } catch (NotFoundException $exception) {
                $response->addErrorMessage(sprintf(_('%s %s was not found.'),
                    _($this->getItemName()),
                    $id
                ));
            }
        }

        // TODO: Create a Report with the successfully used IDs.

        $response->addNotice(sprintf(_('%d %s were affected.'),
            count($successfullyUsedIds), _($this->getCollectionName())
        ));

        return $response;
    }