Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Use dependency injection for SearchRepository #51

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions Classes/Controller/SearchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

use In2code\Femanager\Controller\AbstractController;
use Slub\DigasFeManagement\Domain\Model\Search;
use Slub\DigasFeManagement\Domain\Repository\SearchRepository;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;

Expand All @@ -37,12 +38,22 @@ class SearchController extends AbstractController
{

/**
* searchRepository
* @access protected
* @var SearchRepository
*/
protected SearchRepository $searchRepository;

/**
* @access public
*
* @param SearchRepository $searchRepository
*
* @var \Slub\DigasFeManagement\Domain\Repository\SearchRepository
* @TYPO3\CMS\Extbase\Annotation\Inject
* @return void
*/
protected $searchRepository = null;
public function injectSearchRepository(SearchRepository $searchRepository): void
{
$this->searchRepository = $searchRepository;
}

/**
* action list
Expand Down
Loading