added getSelf

This commit is contained in:
tracer 2022-10-08 10:58:18 +02:00
parent 6cca02b1cf
commit 79942030fa

View File

@ -257,4 +257,16 @@ class PanelRepository
exit($e->getMessage());
}
}
public function getSelf(): ?Panel
{
$panels = $this->findAll();
foreach ($panels as $panel) {
if ($panel->getSelf() === 'yes') {
return $panel;
}
}
return null;
}
}