I have in the model of my own extension a class that extends of FE user of TYPO3 7.6 call CommunityManager, I want to use the calls common to the repository like findByUid()
or findAll()
but they do not work, the value of return is Null
.
I've been researching about it, even in several here questions but it still does not work. I currently have the following settings
In my CommunityManagerController
/**
* communityManagerRepository
*
* @var \TYPO3\CMS\Extbase\Domain\Repository\FrontendUserRepository
* @inject
*/
protected $communityManagerRepository = null;
/**
* action list
*
* @return void
*/
public function listAction()
{
$this->communityManagerRepository = $this->objectManager->get('VENDOR\MyExt\Domain\Repository\CommunityManagerRepository');
$communityManagers = $this->communityManagerRepository->findAll();
$this->view->assign('communityManagers', $communityManagers);
}
The CommunityManagerRepository
class CommunityManagerRepository extends TYPO3\CMS\Extbase\Domain\Repository\FrontendUserRepository
{
public function initializeObject()
{
$defaultQuerySettings = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::class);
$defaultQuerySettings->setRespectStoragePage(false);
$this->setDefaultQuerySettings($defaultQuerySettings);
}
}
And the Typoscript code
In constants
plugin.tx_myext_nameofmyplugin {
persistence {
storagePid = 5
}
}
In setup
config.tx_extbase {
persistence {
classes {
TYPO3\CMS\Extbase\Domain\Model\FrontendUser {
subclasses {
Tx_MyExt_CommunityManager = VENDOR\MyExt\Domain\Model\CommunityManager
}
}
VENDOR\MyExt\Domain\Model\CommunityManager {
mapping {
tableName = fe_users
recordType = Tx_MyExt_CommunityManager
}
}
}
}
}
I would appreciate you guiding me to solve the problem