Markiert: Extbase

TYPO3 Extbase: Get related disabled/hidden object

ext_localconf.php $extbaseObjectContainer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( \TYPO3\CMS\Extbase\Object\Container\Container::class ); $extbaseObjectContainer->registerImplementation( \TYPO3\CMS\Extbase\Persistence\Generic\QueryFactoryInterface::class, \Vendor\Extensionname\Persistence\Generic\QueryFactory::class ); Object Vendor\Extensionname\Persistence\Generic\QueryFactory.php <?php namespace Vendor\Extensionname\Persistence\Generic; use Vendor\Extensionname\Domain\Model\Objectname; class QueryFactory extends \TYPO3\CMS\Extbase\Persistence\Generic\QueryFactory { public function create($className) { $query = parent::create($className); if (is_a($className, Objectname::class, true)) {...

TYPO3: Extbase/Fluid form validation

I released a small demo extension which comes with viewhelpers and validators to validate a fluid form. It also has a password and a password confirmation field. The error messages are shown directly under...

TYPO3: Sorry, the requested view was not found.

Falls man folgende Fehlermeldung erhält und nicht mehr durch das TypoScript hindurchblickt: Sorry, the requested view was not found. The technical reason is: No template was found. View could not be resolved for action...

TYPO3, Extbase: Formulardaten manuell validieren

Hier ein einfaches Beispiel, um eine Checkbox von einem Formular manuell zu validieren: $arguments = $this->request->getArguments(); $validatorResolver = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Validation\\ValidatorResolver'); $conjunctionValidator = $validatorResolver->createValidator('Conjunction'); $conjunctionValidator->addValidator($validatorResolver->createValidator('NotEmpty')); $conjunctionValidator->addValidator($validatorResolver->createValidator('Boolean')); $result = $conjunctionValidator->validate($arguments['agreelicenseterm']); if ($result->hasErrors()) { // Benutzer wieder zurückschicken...