Commit 465b57f8 authored by Tomas Norre Mikkelsen's avatar Tomas Norre Mikkelsen

Merge branch 'feature/add-notification-for-liked-extensions' into 'develop'

Add checks for existing ObjectStorage before add and remove items

See merge request !422
parents 7785139e f7dccf17
Pipeline #7110 passed with stages
in 6 minutes and 1 second
......@@ -84,11 +84,17 @@ class FrontendUser extends \TYPO3\CMS\Extbase\Domain\Model\FrontendUser
public function addNotifiedExtension(Extension $extension): void
{
if ($this->notifiedExtensions === null) {
$this->notifiedExtensions = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
}
$this->notifiedExtensions->attach($extension);
}
public function removeNotifiedExtension(Extension $extension): void
{
if ($this->notifiedExtensions === null) {
$this->notifiedExtensions = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
}
$this->notifiedExtensions->detach($extension);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment