[TYPO3-dev] Extbase: Extension for creating new CTypes

Caspar Stuebs caspar at gosign.de
Fri Nov 21 12:09:44 CET 2014


Hi Raphael,

the controller class has to
extend \TYPO3\CMS\Extbase\Mvc\Controller\ActionController, then it will
work.

Kind Regards
Caspar

2014-11-21 11:20 GMT+01:00 Raphael Weber <mailinglisten at screensolutions.de>:

> Hi,
>
> I've started developing a TYPO3 Extension (v6.2) to add Custom Content
> Elements based on tt_content.
> I've already created the required folders/ files and configured the plugin
> by editing ext_emconf.php, ext_localconf.php and ext_tables.php. Recently I
> created the first controller class and tried to extend the Extbase class
> AbstractPlugin (like css_styled_content):
>
> namespace Screensolutions\SsCustomCes\Controller;
>
> use TYPO3\CMS\Core\Utility\GeneralUtility;
>
> class ThumbnailteaserController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin
> {
> }
>
> Unfortuanetely this is producing following error message:
>
> #1202921619: Invalid controller "Screensolutions\SsCustomCes\Controller\ThumbnailteaserController".
> The controller must implement the TYPO3\CMS\Extbase\Mvc\Controller\
> ControllerInterface.
>
> Can you please explain me how I get this working or what´s the best
> practice to add custom ctypes?
> My internet research to this topic sadly was not very successful; the only
> useful tutorial I found was this one, but it seems to be a little bit
> outdated:
> http://bit.ly/11BrvV9
>
> At the risk of the problem is not the controller, I paste the contents of
> the configuration files here:
>
> ext_tables.php:
>
> <?php
> if (!defined('TYPO3_MODE')) {
>         die('Access denied.');
> }
>
> \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
>         'Screensolutions.' . $_EXTKEY,
>         'Thumbnailteaser',
>         'Bootstrap Thumbnail Teaser'
> );
>
> \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY,
> 'Configuration/TypoScript', 'Custom CEs');
>
> \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
>         '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:ss_custom_
> ces/Configuration/TypoScript/pageTsConfig.ts">'
> );
>
> $TCA['tt_content']['types']['sscustomces_thumbnailteaser']['showitem'] =
> $TCA['tt_content']['types']['textpic']['showitem'];
>
> ----------------------------------------------------------------------
>
> ext_localconf.php:
>
> <?php
> if (!defined('TYPO3_MODE')) {
>         die('Access denied.');
> }
>
> \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
>         'Screensolutions.' . $_EXTKEY,
>         'Thumbnailteaser',
>     array('Thumbnailteaser' => 'show'),
>     array('Thumbnailteaser' => ''),
>
> \TYPO3\CMS\Extbase\Utility\ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT
> );
>
> Hope you`ve got a solution for me!
>
> kind regards,
>         raphael
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev

-- 
-- 

Gosign media. GmbH | We web ideas.
Langenfelder Damm 67 Gewerbehof | 22525 Hamburg
Telefon 040-609 40 79-0

Handelsregister AG HH HRB 112197 | Geschäftsführung Bert Gogolin
Greenpeace energy: Gosign läuft mit ehrlichem Strom und Gas.
GLS Bank: Gosign wirtschaftet mit Gewissen. 



More information about the TYPO3-dev mailing list