added getSelf
This commit is contained in:
parent
6cca02b1cf
commit
79942030fa
@ -257,4 +257,16 @@ class PanelRepository
|
|||||||
exit($e->getMessage());
|
exit($e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getSelf(): ?Panel
|
||||||
|
{
|
||||||
|
$panels = $this->findAll();
|
||||||
|
foreach ($panels as $panel) {
|
||||||
|
if ($panel->getSelf() === 'yes') {
|
||||||
|
return $panel;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user