[TYPO3-mvc] Switchable ControllerActions+Tx_Extbase_Utility_Extension::configurePlugin()

Thomas Nussbaumer typo3 at thomasnu.ch
Tue Aug 9 11:06:11 CEST 2011


Am 09.08.2011 07:24, schrieb Thomas Layh:
> In ext_tables.php:
> ---------------------------------------
>
> Tx_Extbase_Utility_Extension::
> configurePlugin(
> $_EXTKEY,
> 'ListShow',<!-------- this one !!
> array(
> 'ListShow' =>  'list, show',
>
> ),
>        array(
>         'ListShow' =>  '',
>         )
> );
> $pluginSignature = str_replace('_','',$_EXTKEY) . '_' . listshow;
> <!--------------------- this one !!
>
>
> I am not completely sure but I think the two listshow strings that I marked
> must be identical.
>
> Perhaps it helps.
>
> Greetings,
> Thomas
>
>
Hi Paul

Why did you remove '_' in $:EXTKEY? Right is:

$pluginSignature = $_EXTKEY . '_listshow';

or directly:

// Include Flexforms
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY . 
'_listshow'] = 'pi_flexform';

t3lib_extMgm::addPiFlexFormValue(, 'FILE:EXT:' . $_EXTKEY . 
'/Configuration/FlexForms/listshow.xml');

See also:
Extbase/Fluid Cheat Sheet: http://www.typovision.de/cheatsheet/

Greetings,
Thomas (Nussbaumer)

>
> On Mon, Aug 8, 2011 at 21:08, Bader Paul<baderp at gmx.de>  wrote:
>
>> Hi Thomas,
>> thanks for your feedback,
>>
>> now I have the following Code in my ext_localconf.php and I get the same
>> exception as before.
>>
>>
>> <?php
>> if (!defined('TYPO3_MODE')) {
>> die ('Access denied.');
>> }
>>
>> Tx_Extbase_Utility_Extension::**configurePlugin(
>> $_EXTKEY,
>> 'ListShow',
>> array(
>> 'ListShow' =>  'list, show',
>>
>> ),
>>        array(
>>         'ListShow' =>  '',
>>         )
>> );
>>
>> ?>
>>
>> I don't now what ist wrong.
>>
>> Thanks for your help.
>>
>> Paul
>>
>>
>>
>> ----- Original Message ----- From: "Thomas Hucke"<thucke at web.de>
>>
>> Newsgroups: typo3.projects.typo3v4mvc
>> To:<typo3-project-typo3v4mvc@**lists.typo3.org<typo3-project-typo3v4mvc at lists.typo3.org>
>>>
>> Sent: Monday, August 08, 2011 6:41 PM
>>
>> Subject: Re: [TYPO3-mvc]Switchable ControllerActions+Tx_Extbase_**
>> Utility_Extension::**configurePlugin()
>>
>>
>> Try
>>
>> <?php
>> if (!defined('TYPO3_MODE')) {
>>    die ('Access denied.');
>> }
>>
>> Tx_Extbase_Utility_Extension::**configurePlugin(
>>    $_EXTKEY,
>>    'ListShow',
>>     array (        // An array holding the controller-action-combinations
>> that are accessible
>>        'ListShow' =>  'list, show',    // The first controller and its first
>> action will be the default
>>    ),
>>     array (        // An array of non-cachable
>> controller-action-combinations (they must already be enabled)
>>        'ListShow' =>  '',
>>    )
>> );
>> ?>
>>
>> Perhaps the second array is just missing.
>>
>>
>> "Miguel Ayala"  schrieb im Newsbeitrag
>> news:mailman.43718.1312756080.**648.typo3-project-typo3v4mvc@**
>> lists.typo3.org...
>>
>> Hey,
>> have you tried to delete some of the tags? I had a similar problem and I
>> think I deleted the "sDef" tags, but I cant remember very well, maybe it
>> helps...
>>
>>
>> On 08/07/2011 11:44 PM, Bader Paul wrote:
>>
>>> Hi,
>>>
>>> No - I install the Ext. only one time.
>>>
>>> Now I uninstall and install the Ext. - I get the same Exception as before.
>>>
>>> Thanks Paul
>>>
>>>
>>> ----- Original Message ----- From: "Ephraim Härer"<ephraim at mokom01.com>
>>> Newsgroups: typo3.projects.typo3v4mvc
>>> To:<typo3-project-typo3v4mvc@**lists.typo3.org<typo3-project-typo3v4mvc at lists.typo3.org>
>>>>
>>> Sent: Sunday, August 07, 2011 11:24 PM
>>> Subject: Re: [TYPO3-mvc] Switchable ControllerActions+Tx_Extbase_**
>>> Utility_Extension::**configurePlugin()
>>>
>>>
>>> Hello,
>>> did you uninstall an install your extension again?
>>>
>>> Am 07.08.2011 18:41, schrieb Bader Paul:
>>>
>>>> Hi,
>>>>
>>>> I changed my localconf.php to
>>>>
>>>>
>>>> <?php
>>>> if (!defined('TYPO3_MODE')) {
>>>> die ('Access denied.');
>>>> }
>>>>
>>>> Tx_Extbase_Utility_Extension::**configurePlugin(
>>>> $_EXTKEY,
>>>> 'ListShow',
>>>> array(
>>>> 'ListShow' =>  'list, show',
>>>>
>>>> )
>>>> );
>>>> ?>
>>>>
>>>>
>>>> but it`s not working - I get the same Exeception. That must be an other
>>>> problem.
>>>>
>>>> Thanks Paul
>>>> ----- Original Message ----- From: "Mattias Nilsson"<
>>>> mattias at pixelant.se>
>>>> To: "TYPO3 v4 MVC project"<typo3-project-typo3v4mvc@**lists.typo3.org<typo3-project-typo3v4mvc at lists.typo3.org>
>>>>>
>>>> Sent: Sunday, August 07, 2011 5:23 PM
>>>> Subject: Re: [TYPO3-mvc] Switchable ControllerActions
>>>> +Tx_Extbase_Utility_Extension:**:configurePlugin()
>>>>
>>>>
>>>>   In your ext_localconf.php you have a typo:
>>>>>
>>>>> Tx_Extbase_Utility_Extension::
>>>>> configurePlugin(
>>>>> $_EXTKEY,
>>>>> 'Listshow',
>>>>> array(
>>>>> 'ListShow' =>  'list, show',
>>>>>
>>>>> )
>>>>> );
>>>>>
>>>>> As i Can se it should not be namned Listshow but =>  ListShow
>>>>>
>>>>>
>>>>> On Sun, Aug 7, 2011 at 4:41 PM, Bader Paul<baderp at gmx.de>  wrote:
>>>>>
>>>>>   Hi List,
>>>>>>
>>>>>> Maybe someone can me help.
>>>>>>
>>>>>> As a Exampleextesion for me I will build a Plugin width List- and
>>>>>> Singleview on two pages.
>>>>>> One Page width Listview and one Page width singleview.
>>>>>>
>>>>>>
>>>>>> 1. I create the following Controller and the Plugin works fine on one
>>>>>> page.
>>>>>> It`s simple created by the ExtensionBuilder
>>>>>>
>>>>>> /**
>>>>>> * Controller for the ListShow object
>>>>>> */
>>>>>> class Tx_Listshow_Controller_**ListShowController extends
>>>>>> Tx_Extbase_MVC_Controller_**ActionController {
>>>>>>
>>>>>> /**
>>>>>> * @var Tx_Listshow_Domain_Repository_**ListShowRepository
>>>>>> */
>>>>>> protected $listShowRepository;
>>>>>>
>>>>>> /**
>>>>>> * @param Tx_Listshow_Domain_Repository_**ListShowRepository
>>>>>> $listShowRepository
>>>>>> * @return void
>>>>>> */
>>>>>> public function
>>>>>> injectListShowRepository(Tx_**Listshow_Domain_Repository_**
>>>>>> ListShowRepository
>>>>>>
>>>>>> $listShowRepository) {
>>>>>> $this->listShowRepository = $listShowRepository;
>>>>>> }
>>>>>>
>>>>>>
>>>>>>
>>>>>> /**
>>>>>> * Displays all ListShows
>>>>>> *
>>>>>> * @return void
>>>>>> */
>>>>>> public function listAction() {
>>>>>> $configuration =
>>>>>> $this->configurationManager->**getConfiguration(Tx_Extbase_**
>>>>>> Configuration_**ConfigurationManagerInterface:**
>>>>>> :CONFIGURATION_TYPE_FRAMEWORK)**;
>>>>>>
>>>>>> $listShows = $this->listShowRepository->**findAll();
>>>>>> $this->view->assign('**listShows', $listShows);
>>>>>> }
>>>>>>
>>>>>>
>>>>>> /**
>>>>>> * Displays a single ListShow
>>>>>> *
>>>>>> * @param Tx_Listshow_Domain_Model_**ListShow $listShow the ListShow to
>>>>>> display
>>>>>> * @return string The rendered view
>>>>>> */
>>>>>> public function showAction(Tx_Listshow_Domain_**Model_ListShow
>>>>>> $listShow) {
>>>>>> $this->view->assign('listShow'**, $listShow);
>>>>>> }
>>>>>>
>>>>>>
>>>>>> }
>>>>>> ?>
>>>>>>
>>>>>> 2.I create the following new Flexform.xml for the Plugin and the Plugin
>>>>>> works fine.
>>>>>>
>>>>>> <T3DataStructure>
>>>>>> <sheets>
>>>>>> <sDEF>
>>>>>> <ROOT>
>>>>>> <TCEforms>
>>>>>> <sheetTitle>Optionen</**sheetTitle>
>>>>>> </TCEforms>
>>>>>> <type>array</type>
>>>>>> <el>
>>>>>> <switchableControllerActions>
>>>>>> <TCEforms>
>>>>>> <label>Plugin type</label>
>>>>>> <config>
>>>>>> <type>select</type>
>>>>>> <items type="array">
>>>>>> <numIndex index="1" type="array">
>>>>>> <numIndex index="0">Listen Ansicht</numIndex>
>>>>>> <numIndex index="1">ListShow->list</**numIndex>
>>>>>> </numIndex>
>>>>>> <numIndex index="2" type="array">
>>>>>> <numIndex index="0">Detail Ansicht</numIndex>
>>>>>> <numIndex index="1">ListShow->show</**numIndex>
>>>>>> </numIndex>
>>>>>> </items>
>>>>>> </config>
>>>>>> </TCEforms>
>>>>>> </switchableControllerActions>
>>>>>> </el>
>>>>>> </ROOT>
>>>>>> </sDEF>
>>>>>> </sheets>
>>>>>> </T3DataStructure>
>>>>>>
>>>>>> 3. In my ext_tables.php I have the following code.
>>>>>>
>>>>>> <?php
>>>>>> if (!defined('TYPO3_MODE')) {
>>>>>> die ('Access denied.');
>>>>>> }
>>>>>>
>>>>>> Tx_Extbase_Utility_Extension::**registerPlugin(
>>>>>> $_EXTKEY,
>>>>>> 'ListShow',
>>>>>> 'listshow'
>>>>>> );
>>>>>>
>>>>>> $pluginSignature = str_replace('_','',$_EXTKEY) . '_' . listshow;
>>>>>> $TCA['tt_content']['types']['**list']['subtypes_addlist'][$**
>>>>>> pluginSignature]
>>>>>> =
>>>>>> 'pi_flexform';
>>>>>> t3lib_extMgm::**addPiFlexFormValue($**pluginSignature, 'FILE:EXT:' .
>>>>>> $_EXTKEY .
>>>>>> '/Configuration/FlexForms/**flexform_' .listshow. '.xml');
>>>>>>
>>>>>> 4. In my ext_localconf.php I have the following Code.
>>>>>>
>>>>>> <?php
>>>>>> if (!defined('TYPO3_MODE')) {
>>>>>> die ('Access denied.');
>>>>>> }
>>>>>>
>>>>>> Tx_Extbase_Utility_Extension::**configurePlugin(
>>>>>> $_EXTKEY,
>>>>>> 'Listshow',
>>>>>> array(
>>>>>> 'ListShow' =>  'list, show',
>>>>>>
>>>>>> )
>>>>>> );
>>>>>>
>>>>>> ?>
>>>>>>
>>>>>> 5. When I look on the Page width the selected Listview Controller I get
>>>>>> following Exeption.
>>>>>>
>>>>>>
>>>>>> #1295479650: The default controller can not be determined.
>>>>>> Please check for Tx_Extbase_Utility_Extension::**configurePlugin() in
>>>>>> your
>>>>>> ext_localconf.php.
>>>>>>
>>>>>>
>>>>>> Sorry what is her wrong - Have anybody an idea.
>>>>>>
>>>>>> Thanks for your help
>>>>>>
>>>>>> Paul
>>>>>> ______________________________**_________________
>>>>>> TYPO3-project-typo3v4mvc mailing list
>>>>>> TYPO3-project-typo3v4mvc@**lists.typo3.org<TYPO3-project-typo3v4mvc at lists.typo3.org>
>>>>>> http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-**
>>>>>> project-typo3v4mvc<http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Mvh
>>>>> /Mattias
>>>>> ______________________________**_________________
>>>>> TYPO3-project-typo3v4mvc mailing list
>>>>> TYPO3-project-typo3v4mvc@**lists.typo3.org<TYPO3-project-typo3v4mvc at lists.typo3.org>
>>>>> http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-**
>>>>> project-typo3v4mvc<http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc>
>>>>>
>>>>
>>>>
>>>
>>>
>> ______________________________**_________________
>> TYPO3-project-typo3v4mvc mailing list
>> TYPO3-project-typo3v4mvc@**lists.typo3.org<TYPO3-project-typo3v4mvc at lists.typo3.org>
>> http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-**
>> project-typo3v4mvc<http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc>
>> ______________________________**_________________
>> TYPO3-project-typo3v4mvc mailing list
>> TYPO3-project-typo3v4mvc@**lists.typo3.org<TYPO3-project-typo3v4mvc at lists.typo3.org>
>> http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-**
>> project-typo3v4mvc<http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc>
>>



More information about the TYPO3-project-typo3v4mvc mailing list