extbase

TYPO3 4.6 include extbase plugin with typoscript

我的梦境 提交于 2019-12-08 03:13:36
问题 I have TYPO3 4.6, in tempvoila template i have typoscript object path lib.header and I want to redirect output of plugin to lib.header I have extension Gallery and plugin written and configured in ext_localconf.php like this: Tx_Extbase_Utility_Extension::configurePlugin( $_EXTKEY, 'RandomPhotoSlideShow', array( 'Photo' => 'randomPhotoSlideShow', ), // non-cacheable actions array( 'Photo' => '' ) ); in ext_tables.php like this: Tx_Extbase_Utility_Extension::registerPlugin( $_EXTKEY,

How can I use an injected object in the constructor?

隐身守侯 提交于 2019-12-08 00:10:59
问题 I have a service class in my Extbase extension and want to use the ObjectManager to create an instance of an object in the constructor. /** * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface * @inject */ protected $objectManager; public function __construct() { $this->standaloneView = $this->objectManager->get('TYPO3\CMS\Fluid\View\StandaloneView'); $this->standaloneView->setFormat('html'); } Unfortunately this doesn't fails with an error Call to a member function get() on null because

how to include public resources to typo3 extbase extension

你说的曾经没有我的故事 提交于 2019-12-07 18:23:42
问题 I'm building an extension that creates a backend module that enables be_users to resize images. I'm trying to add / include css and javascript files by using the pageRenderer but the files are never included I can only apply css if add it directly in the fluid Template using a style tag and include the javascript file with a script tag. I tried something like this in the controller protected $pageRenderer; .... $this->pageRenderer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\

Extend TYPO3 femanager

雨燕双飞 提交于 2019-12-07 14:28:31
问题 Does anyone have a working example how to extend femanager 3.3.0 on TYPO3 8.7? I created a new Extension which does all the stuff (new database fields for fe_user, TCA, Partials,....). I have the new fields in the femanager plugin and can select them for the frontend. Registering IS WORKING: the new fields are saved in the database. There is a Warning in the Log: Core: Error handler (FE): PHP Warning: Declaration of TOCO3\TocoLedes\Controller\NewController::createAction(TOCO3\TocoLedes\Domain

Add/Create Element to ObjectStorage using Javascript in Extbase/Fluid TYPO3

限于喜欢 提交于 2019-12-07 12:03:17
问题 what is the correct way to dynamically create new Child Elements in a Fluid Form using JavaScript? Problem: 1:n Relation (Parent/Child) using Extbase ObjectStorages: When the Parent Fluid Form is called it should be possible to add several childs (incl. properties of course!) Dirty, partly working, Solution: I added some JS Code and added the required input elements dynamically. The "xxx" will be interated for each Child. The data will be correctly stored in the DB. <input type="text"

How to get TYPO3 settings in the utility files?

血红的双手。 提交于 2019-12-06 20:02:36
问题 plugin.tx_xxx { setting { storagePid = 23 } } I want this TYPO3 settings in utility file. Please help me. 回答1: The above method works only in controller or services class try below it will work in any PHP files in Extension. $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\Extbase\\Object\\ObjectManager'); $configurationManager = $objectManager->get('TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManager'); $extbaseFrameworkConfiguration =

TYPO3: Add custom set functions in extension controller

↘锁芯ラ 提交于 2019-12-06 19:45:38
I'm creating an extension for visitors to sign up to the page. When signing up, it should create a FE user in the backend which is disabled (and will be manually enabled by an admin). So I'll need to set the disable field to 1 when creating the FE user. This is the function inside my controller: /** * action create * * @param \Vendor\FeReg\Domain\Model\Dummy $newDummy * @return void */ public function createAction(\Vendor\FeReg\Domain\Model\Dummy $newDummy) { // vars $title = $newDummy->getTitle(); $atitle = $newDummy->getAtitle(); $fname = $newDummy->getFname(); $lname = $newDummy->getLname()

TYPO3 4.6 include extbase plugin with typoscript

旧巷老猫 提交于 2019-12-06 15:59:37
I have TYPO3 4.6, in tempvoila template i have typoscript object path lib.header and I want to redirect output of plugin to lib.header I have extension Gallery and plugin written and configured in ext_localconf.php like this: Tx_Extbase_Utility_Extension::configurePlugin( $_EXTKEY, 'RandomPhotoSlideShow', array( 'Photo' => 'randomPhotoSlideShow', ), // non-cacheable actions array( 'Photo' => '' ) ); in ext_tables.php like this: Tx_Extbase_Utility_Extension::registerPlugin( $_EXTKEY, 'RandomPhotoSlideShow', 'Gets random photos for slide show' ); and in typoscript template I have this: plugin.tx

TYPO3 Extbase fe_user UID in own model

自闭症网瘾萝莉.ら 提交于 2019-12-06 13:35:07
问题 I create a extbase Plugin in TYPO3 6.2. In one table i have a field "fuid" where i want to store the fe_users uid, to know which user can edit this record. I set the "fuid" in createAction: $newLocation->setFuID((int) $GLOBALS['TSFE']->fe_user->user['uid']); This work. In the Database is the right UID. But in the editAction: $location->getFuID() returns null Why? TCA: fu_i_d' => array( 'exclude' => 1, 'label' => 'LLL:EXT:pitss24/Resources/Private/Language/locallang_db.xlf:tx_pitss24_domain

TYPO3: Remove validation from ObjectStorage property in model

喜夏-厌秋 提交于 2019-12-06 10:04:10
Does anyone knows if it is possible to remove recursive validation from model in extbase TYPO3? Let's say I have model with following properties: /** * @var string * @validate NotEmpty */ protected $title; /** * @var string * @validate NotEmpty */ protected $city; /** * @lazy * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<my/model/classname> */ protected $categories; When passing my object to controller action I want only title and city to be validated. I would like categories not to be validated. Extbase is validating all relations in ObjectStorage recursively - so if my/model/classname