Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/app/Observers/EggVariableObserver.php
10264 views
1
<?php
2
3
namespace Pterodactyl\Observers;
4
5
use Pterodactyl\Models\EggVariable;
6
7
class EggVariableObserver
8
{
9
public function creating(EggVariable $variable): void
10
{
11
// @phpstan-ignore-next-line property.notFound
12
if ($variable->field_type) {
13
unset($variable->field_type);
14
}
15
}
16
17
public function updating(EggVariable $variable): void
18
{
19
// @phpstan-ignore-next-line property.notFound
20
if ($variable->field_type) {
21
unset($variable->field_type);
22
}
23
}
24
}
25
26