From 932bb5c1f30b68f92a103e62d5e81d9f6c7d8c66 Mon Sep 17 00:00:00 2001 From: Francois Suter Date: Tue, 8 Mar 2016 15:58:39 +0100 Subject: [PATCH] [CLEANUP] Add comments and "::class" usage --- Classes/Browser/RecordBrowser.php | 8 ++++++++ Classes/RecordLinkHandler.php | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Classes/Browser/RecordBrowser.php b/Classes/Browser/RecordBrowser.php index 81c89fa..39f567c 100644 --- a/Classes/Browser/RecordBrowser.php +++ b/Classes/Browser/RecordBrowser.php @@ -16,6 +16,14 @@ use TYPO3\CMS\Recordlist\Browser\DatabaseBrowser; +/** + * Extends the DatabaseBrowser for the specific needs of the LinkBrowser. + * + * Mostly this is about being able to set to some parameters that cannot + * be set from outside the DatabaseBrowser. + * + * @package Cobweb\Linkhandler\Browser + */ class RecordBrowser extends DatabaseBrowser { /** diff --git a/Classes/RecordLinkHandler.php b/Classes/RecordLinkHandler.php index c58aea2..35add95 100644 --- a/Classes/RecordLinkHandler.php +++ b/Classes/RecordLinkHandler.php @@ -14,6 +14,7 @@ * The TYPO3 project - inspiring people to share! */ +use Cobweb\Linkhandler\Browser\RecordBrowser; use Psr\Http\Message\ServerRequestInterface; use Cobweb\Linkhandler\Tree\View\RecordBrowserPageTreeView; use TYPO3\CMS\Backend\Utility\BackendUtility; @@ -168,8 +169,8 @@ public function render(ServerRequestInterface $request) $this->expandPage = (int)$this->configuration['storagePid']; } - /** @var \Cobweb\Linkhandler\Browser\RecordBrowser $databaseBrowser */ - $databaseBrowser = GeneralUtility::makeInstance('Cobweb\\Linkhandler\\Browser\\RecordBrowser'); + /** @var RecordBrowser $databaseBrowser */ + $databaseBrowser = GeneralUtility::makeInstance(RecordBrowser::class); // Page tree may be hidden if ($this->configuration['hidePageTree']) {