restoreBackup example

$resource = $this->Request()->getParam('resource');
        $id = \is_null($this->Request()->getParam('id')) ? null : (int) $this->Request()->getParam('id');

        if (!\is_int($id)) {
            throw new \DomainException('No ID was provided');
        }

        $offset = (int) $this->Request()->getParam('offset', 0);

        /** @var ResourceInterface $resource */
        $resource = $this->container->get('multi_edit.' . $resource);
        $data = $resource->restoreBackup($id$offset);

        $this->View()->assign([
            'success' => true,
            'data' => $data,
        ]);
    }

    /** * Returns the backups available for the current resource * * @retrun void */
Home | Imprint | This part of the site doesn't use cookies.