-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from jweiland-net/mkBaseSearchOnClubdirectory
[Feature] Added Search with Categories and Sorting
- Loading branch information
Showing
12 changed files
with
529 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?php | ||
declare(strict_types=1); | ||
namespace JWeiland\Socialservices\Configuration; | ||
|
||
/* | ||
* This file is part of the socialservices project. | ||
* | ||
* It is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License, either version 2 | ||
* of the License, or any later version. | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE.txt file that was distributed with this source code. | ||
* | ||
* The TYPO3 project - inspiring people to share! | ||
*/ | ||
|
||
use TYPO3\CMS\Core\SingletonInterface; | ||
|
||
/** | ||
* Class ExtConf | ||
*/ | ||
class ExtConf implements SingletonInterface | ||
{ | ||
/** | ||
* root category. | ||
* | ||
* @var int | ||
*/ | ||
protected $rootCategory = 0; | ||
|
||
/** | ||
* constructor of this class | ||
* This method reads the global configuration and calls the setter methods. | ||
*/ | ||
public function __construct() | ||
{ | ||
// get global configuration | ||
$extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['socialservices'], ['allowed_classes' => false]); | ||
if (is_array($extConf) && count($extConf)) { | ||
// call setter method foreach configuration entry | ||
foreach ($extConf as $key => $value) { | ||
$methodName = 'set' . ucfirst($key); | ||
if (method_exists($this, $methodName)) { | ||
$this->$methodName($value); | ||
} | ||
} | ||
} | ||
} | ||
|
||
/** | ||
* @return int | ||
*/ | ||
public function getRootCategory(): int | ||
{ | ||
return $this->rootCategory; | ||
} | ||
|
||
/** | ||
* @param string $rootCategory | ||
*/ | ||
public function setRootCategory(string $rootCategory) | ||
{ | ||
$this->rootCategory = (int)$rootCategory; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.