Complete the service option export configuration
This commit is contained in:
parent
0d739257a9
commit
d608c313c3
6 changed files with 141 additions and 40 deletions
|
@ -9,23 +9,29 @@
|
|||
|
||||
namespace Pterodactyl\Contracts\Repository;
|
||||
|
||||
use Pterodactyl\Models\ServiceOption;
|
||||
|
||||
interface ServiceOptionRepositoryInterface extends RepositoryInterface
|
||||
{
|
||||
/**
|
||||
* Return a service option with the variables relation attached.
|
||||
*
|
||||
* @param int $id
|
||||
* @return mixed
|
||||
* @return \Pterodactyl\Models\ServiceOption
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function getWithVariables($id);
|
||||
public function getWithVariables(int $id): ServiceOption;
|
||||
|
||||
/**
|
||||
* Return a service option with the copyFrom relation loaded onto the model.
|
||||
* Return a service option with the scriptFrom and configFrom relations loaded onto the model.
|
||||
*
|
||||
* @param int $id
|
||||
* @return mixed
|
||||
* @return \Pterodactyl\Models\ServiceOption
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function getWithCopyFrom($id);
|
||||
public function getWithCopyAttributes(int $id): ServiceOption;
|
||||
|
||||
/**
|
||||
* Confirm a copy script belongs to the same service as the item trying to use it.
|
||||
|
@ -34,5 +40,5 @@ interface ServiceOptionRepositoryInterface extends RepositoryInterface
|
|||
* @param int $service
|
||||
* @return bool
|
||||
*/
|
||||
public function isCopiableScript($copyFromId, $service);
|
||||
public function isCopiableScript(int $copyFromId, int $service): bool;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue