2022-05-15 14:40:19 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Pterodactyl\Observers;
|
|
|
|
|
|
|
|
|
|
use Pterodactyl\Models\EggVariable;
|
|
|
|
|
|
|
|
|
|
class EggVariableObserver
|
|
|
|
|
{
|
|
|
|
|
public function creating(EggVariable $variable): void
|
|
|
|
|
{
|
2025-12-20 15:55:13 -08:00
|
|
|
// @phpstan-ignore-next-line property.notFound
|
2022-05-15 14:40:19 -04:00
|
|
|
if ($variable->field_type) {
|
|
|
|
|
unset($variable->field_type);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function updating(EggVariable $variable): void
|
|
|
|
|
{
|
2025-12-20 15:55:13 -08:00
|
|
|
// @phpstan-ignore-next-line property.notFound
|
2022-05-15 14:40:19 -04:00
|
|
|
if ($variable->field_type) {
|
|
|
|
|
unset($variable->field_type);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|