Finalize service option import/export
This commit is contained in:
parent
d608c313c3
commit
6269a08db7
16 changed files with 405 additions and 271 deletions
|
@ -33,6 +33,16 @@ interface ServiceOptionRepositoryInterface extends RepositoryInterface
|
|||
*/
|
||||
public function getWithCopyAttributes(int $id): ServiceOption;
|
||||
|
||||
/**
|
||||
* Return all of the data needed to export a service.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Pterodactyl\Models\ServiceOption
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function getWithExportAttributes(int $id): ServiceOption;
|
||||
|
||||
/**
|
||||
* Confirm a copy script belongs to the same service as the item trying to use it.
|
||||
*
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
namespace Pterodactyl\Contracts\Repository;
|
||||
|
||||
use Pterodactyl\Models\Service;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
interface ServiceRepositoryInterface extends RepositoryInterface
|
||||
{
|
||||
|
@ -18,23 +17,29 @@ interface ServiceRepositoryInterface extends RepositoryInterface
|
|||
* Return a service or all services with their associated options, variables, and packs.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Support\Collection
|
||||
* @return \Illuminate\Database\Eloquent\Collection|\Pterodactyl\Models\Service
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function getWithOptions(int $id = null): Collection;
|
||||
public function getWithOptions(int $id = null);
|
||||
|
||||
/**
|
||||
* Return a service or all services and the count of options, packs, and servers for that service.
|
||||
*
|
||||
* @param int|null $id
|
||||
* @return \Illuminate\Support\Collection
|
||||
* @return \Pterodactyl\Models\Service|\Illuminate\Database\Eloquent\Collection
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function getWithCounts(int $id = null): Collection;
|
||||
public function getWithCounts(int $id = null);
|
||||
|
||||
/**
|
||||
* Return a service along with its associated options and the servers relation on those options.
|
||||
*
|
||||
* @param int $id
|
||||
* @return mixed
|
||||
* @return \Pterodactyl\Models\Service
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function getWithOptionServers(int $id): Service;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue