SlideShare a Scribd company logo
TYPO3 6.2 for extension developer
» Checklist
» Do‘s
» Don‘ts
CPS-IT Mehr Wert im Netz 1
About me
 Known as @IchHabRecht
 Nicole Cordes from Berlin
 Programmer since 1998
 Using TYPO3 since 2007
 Certified TYPO3 integrator since 2011
 Active contributer for TYPO3 CMS since 2013 (6.0)
 Member of security and PHPUnit team
 Working on multiple extensions as contributer
CPS-IT Mehr Wert im Netz 2
Checklist
General
 Remove all include(), include_once(), require(), require_once()
 Use convention over configuration for autoloading
 Or at least an ext_autoload.php file
 Adapt xclasses
Backend
 Use „_DISPATCH“ as script configuration for backend modules
 BackendUtility::getModuleUrl() and BackendUtility::getAjaxUrl()
CPS-IT Mehr Wert im Netz 3
Autoload
 Cache lookup
 Check for core file (namespace TYPO3CMS)
=> Class name reflects folder structure
 Check runtime cache
=> filled with information by loaded ext_autoload.php files
 Get file from class name („extbase convention“)
CPS-IT Mehr Wert im Netz 4
XCLASS
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['TYPO3CMSPermControllerPermissionModuleController'] = array(
'className' => 'Tx_BeAcl_Xclass_PermissionModuleController',
);
 GeneralUtility::makeInstance()
 Recursive dissolving
CPS-IT Mehr Wert im Netz 5
Dispatch
Changeinconf.php
$MCONF['script']='_DISPATCH';
Remove inindex.php
unset($MCONF);
require_once('conf.php');
require_once($BACK_PATH . 'init.php');
require_once($BACK_PATH . 'template.php');
CPS-IT Mehr Wert im Netz 6
Backend links
$url = TYPO3CMSBackendUtilityBackendUtility::getModuleUrl(
$moduleName,
$urlParameters = array(),
$backPathOverride = FALSE,
$returnAbsoluteUrl = FALSE
);
CPS-IT Mehr Wert im Netz 7
Ajax links
Register your ajax script
TYPO3CMSCoreUtilityExtensionManagementUtility::registerAjaxHandler(
‘myAjaxId’,
‘MyVendormyExtensionPathToClass.php’
);
> Automatically published to TYPO3.settings.ajaxUrls[‘myAjaxId']
Use your ajax script
Ext.Ajax.request({
url: TYPO3.settings.ajaxUrls[‘myAjaxId']
});
CPS-IT Mehr Wert im Netz 8
Do‘s
 Old class names still work due to class mapping
 Old hook names still the same
 Use signal / slots
CPS-IT Mehr Wert im Netz 9
Connect function to signal
TYPO3CMSCoreUtilityGeneralUtility::makeInstance('TYPO3CMSExtbaseSignalSlot
Dispatcher')->connect(
‘SignalClassName',
‘SignalName’,
‘SlotClassNameOrObject',
‘SlotMethodName'
);
Use signal / slots
Find signal
 Function prefixed with “emit”
 Calls dispatch() function from
TYPO3CMSExtbaseSignalSlotDispatcher
> This way you can introduce own signals
CPS-IT Mehr Wert im Netz 10
Don‘ts
General
 Prevent any logic in ext_autoload.php configuration (e.g. require
other files)
 No need for t3lib_div::loadTCA()
Eid scripts
 No need to connect to database by tslib_eidtools::connectDB()
CPS-IT Mehr Wert im Netz 11
Don‘ts
Extbase
 Database driven object are only stored by calling the repository
functions or persisted manually by calling
$this->objectManager->get(
'TYPO3CMSExtbasePersistenceGenericPersistenceManager‚
)->persistAll();
 Disable the backport of the property mapper
plugin.tx_cpsblogexample.features.rewrittenPropertyMapper = 0
 New functions in
TYPO3CMSExtbasePersistenceGenericQuerySettingsInterface
CPS-IT Mehr Wert im Netz 12
Thank you
for your attention!
Contact:
@IchHabRecht
typo3.slack.com
typo3@cordes.co
cps-it.cordes

More Related Content

PPT
Powerful and flexible templates with Twig
PPT
Dance for the puppet master: G6 Tech Talk
PDF
「Code igniter」を読もう。〜ソースコードから知る仕様や拡張方法〜
PDF
Databases and MySQL
PPTX
Isotope, WP REST API, and AJAX...Oh my!
PDF
How to cheat jb detector and detect cheating
PDF
Phinx talk
KEY
Lu solr32 34-20110912
Powerful and flexible templates with Twig
Dance for the puppet master: G6 Tech Talk
「Code igniter」を読もう。〜ソースコードから知る仕様や拡張方法〜
Databases and MySQL
Isotope, WP REST API, and AJAX...Oh my!
How to cheat jb detector and detect cheating
Phinx talk
Lu solr32 34-20110912

What's hot (20)

DOCX
Php mysql connectivity
PDF
PHP and Databases
PPTX
Stackato Presentation Techzone 2013
PDF
Codeigniter : Using Third Party Components - Zend Framework Components
PDF
Long Tail Treasure Trove
PPTX
An introduction to Laravel Passport
PDF
Power shell examples_v4
PDF
Codeigniter : Two Step View - Concept Implementation
PDF
Oracle to MySQL DatabaseLink
PDF
Nikita Tuk: Handling background processes in iOS: problems & solutions
PDF
Harnessing Stack Overflow for the IDE - RSSE 2012
PDF
Authoring CPAN modules
PDF
Vancouver presentation
PDF
What happens in laravel 4 bootstraping
KEY
Phpne august-2012-symfony-components-friends
ODP
Database Connection With Mysql
PDF
Refresh development from productions
PDF
Why you shouldn’t edit silver stripe core files (and how to do it anyway)
PDF
extending-php
PPT
Php Mysql
Php mysql connectivity
PHP and Databases
Stackato Presentation Techzone 2013
Codeigniter : Using Third Party Components - Zend Framework Components
Long Tail Treasure Trove
An introduction to Laravel Passport
Power shell examples_v4
Codeigniter : Two Step View - Concept Implementation
Oracle to MySQL DatabaseLink
Nikita Tuk: Handling background processes in iOS: problems & solutions
Harnessing Stack Overflow for the IDE - RSSE 2012
Authoring CPAN modules
Vancouver presentation
What happens in laravel 4 bootstraping
Phpne august-2012-symfony-components-friends
Database Connection With Mysql
Refresh development from productions
Why you shouldn’t edit silver stripe core files (and how to do it anyway)
extending-php
Php Mysql
Ad

Viewers also liked (10)

PDF
Vi Cheat Sheet v 1 00
PDF
Git im team
ZIP
PHP_Codesniffer
KEY
TDD & Best Practices mit TYPO3
PDF
Minimum introduction to Git
PPTX
Testgetriebene Entwicklung
PPTX
SymfonyCon Berlin 2016 Jenkins Deployment Pipelines
PDF
Handling 10k requests per second with Symfony and Varnish - SymfonyCon Berlin...
PDF
(PHP)Unit - bad Practices
PDF
Ringvorlesung ITmitte.de : Vortrag der FIO SYSTEMS AG über Unit Tests und TDD
Vi Cheat Sheet v 1 00
Git im team
PHP_Codesniffer
TDD & Best Practices mit TYPO3
Minimum introduction to Git
Testgetriebene Entwicklung
SymfonyCon Berlin 2016 Jenkins Deployment Pipelines
Handling 10k requests per second with Symfony and Varnish - SymfonyCon Berlin...
(PHP)Unit - bad Practices
Ringvorlesung ITmitte.de : Vortrag der FIO SYSTEMS AG über Unit Tests und TDD
Ad

Similar to TYPO3 6.2 for extension developer (20)

ODP
CodeIgniter PHP MVC Framework
PDF
Doctrine in FLOW3
DOCX
SCasia 2018 MSFT hands on session for Azure Batch AI
PDF
Tornadoweb
PDF
Legacy applications - 4Developes konferencja, Piotr Pasich
PDF
Estendere applicazioni extbase
PDF
ACL in CodeIgniter
PDF
Symfony2 - from the trenches
PPTX
CodeIgniter & MVC
PDF
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
PDF
Jetpack, with new features in 2021 GDG Georgetown IO Extended
PDF
EPHPC Webinar Slides: Unit Testing by Arthur Purnama
PDF
Build powerfull and smart web applications with Symfony2
ODP
Built-in query caching for all PHP MySQL extensions/APIs
PDF
Symfony internals [english]
PPTX
Flask – Python
PPTX
Database connectivity in python
PPTX
Cloud nativeworkshop
PDF
New Symfony Tips & Tricks (SymfonyCon Paris 2015)
PPTX
Spine.js
CodeIgniter PHP MVC Framework
Doctrine in FLOW3
SCasia 2018 MSFT hands on session for Azure Batch AI
Tornadoweb
Legacy applications - 4Developes konferencja, Piotr Pasich
Estendere applicazioni extbase
ACL in CodeIgniter
Symfony2 - from the trenches
CodeIgniter & MVC
Grâce aux tags Varnish, j'ai switché ma prod sur Raspberry Pi
Jetpack, with new features in 2021 GDG Georgetown IO Extended
EPHPC Webinar Slides: Unit Testing by Arthur Purnama
Build powerfull and smart web applications with Symfony2
Built-in query caching for all PHP MySQL extensions/APIs
Symfony internals [english]
Flask – Python
Database connectivity in python
Cloud nativeworkshop
New Symfony Tips & Tricks (SymfonyCon Paris 2015)
Spine.js

Recently uploaded (20)

PDF
Unit-1 introduction to cyber security discuss about how to secure a system
PPT
Ethics in Information System - Management Information System
PPTX
Database Information System - Management Information System
PPTX
Funds Management Learning Material for Beg
PPTX
Internet___Basics___Styled_ presentation
PPTX
t_and_OpenAI_Combined_two_pressentations
PPTX
presentation_pfe-universite-molay-seltan.pptx
PPTX
E -tech empowerment technologies PowerPoint
PDF
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
PDF
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
PPTX
newyork.pptxirantrafgshenepalchinachinane
PPTX
Module 1 - Cyber Law and Ethics 101.pptx
PPTX
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PDF
mera desh ae watn.(a source of motivation and patriotism to the youth of the ...
PPTX
artificial intelligence overview of it and more
PDF
The Ikigai Template _ Recalibrate How You Spend Your Time.pdf
PDF
Smart Home Technology for Health Monitoring (www.kiu.ac.ug)
PDF
Introduction to the IoT system, how the IoT system works
Unit-1 introduction to cyber security discuss about how to secure a system
Ethics in Information System - Management Information System
Database Information System - Management Information System
Funds Management Learning Material for Beg
Internet___Basics___Styled_ presentation
t_and_OpenAI_Combined_two_pressentations
presentation_pfe-universite-molay-seltan.pptx
E -tech empowerment technologies PowerPoint
💰 𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓 💰
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
newyork.pptxirantrafgshenepalchinachinane
Module 1 - Cyber Law and Ethics 101.pptx
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
The New Creative Director: How AI Tools for Social Media Content Creation Are...
SASE Traffic Flow - ZTNA Connector-1.pdf
mera desh ae watn.(a source of motivation and patriotism to the youth of the ...
artificial intelligence overview of it and more
The Ikigai Template _ Recalibrate How You Spend Your Time.pdf
Smart Home Technology for Health Monitoring (www.kiu.ac.ug)
Introduction to the IoT system, how the IoT system works

TYPO3 6.2 for extension developer

  • 1. TYPO3 6.2 for extension developer » Checklist » Do‘s » Don‘ts
  • 2. CPS-IT Mehr Wert im Netz 1 About me  Known as @IchHabRecht  Nicole Cordes from Berlin  Programmer since 1998  Using TYPO3 since 2007  Certified TYPO3 integrator since 2011  Active contributer for TYPO3 CMS since 2013 (6.0)  Member of security and PHPUnit team  Working on multiple extensions as contributer
  • 3. CPS-IT Mehr Wert im Netz 2 Checklist General  Remove all include(), include_once(), require(), require_once()  Use convention over configuration for autoloading  Or at least an ext_autoload.php file  Adapt xclasses Backend  Use „_DISPATCH“ as script configuration for backend modules  BackendUtility::getModuleUrl() and BackendUtility::getAjaxUrl()
  • 4. CPS-IT Mehr Wert im Netz 3 Autoload  Cache lookup  Check for core file (namespace TYPO3CMS) => Class name reflects folder structure  Check runtime cache => filled with information by loaded ext_autoload.php files  Get file from class name („extbase convention“)
  • 5. CPS-IT Mehr Wert im Netz 4 XCLASS $GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['TYPO3CMSPermControllerPermissionModuleController'] = array( 'className' => 'Tx_BeAcl_Xclass_PermissionModuleController', );  GeneralUtility::makeInstance()  Recursive dissolving
  • 6. CPS-IT Mehr Wert im Netz 5 Dispatch Changeinconf.php $MCONF['script']='_DISPATCH'; Remove inindex.php unset($MCONF); require_once('conf.php'); require_once($BACK_PATH . 'init.php'); require_once($BACK_PATH . 'template.php');
  • 7. CPS-IT Mehr Wert im Netz 6 Backend links $url = TYPO3CMSBackendUtilityBackendUtility::getModuleUrl( $moduleName, $urlParameters = array(), $backPathOverride = FALSE, $returnAbsoluteUrl = FALSE );
  • 8. CPS-IT Mehr Wert im Netz 7 Ajax links Register your ajax script TYPO3CMSCoreUtilityExtensionManagementUtility::registerAjaxHandler( ‘myAjaxId’, ‘MyVendormyExtensionPathToClass.php’ ); > Automatically published to TYPO3.settings.ajaxUrls[‘myAjaxId'] Use your ajax script Ext.Ajax.request({ url: TYPO3.settings.ajaxUrls[‘myAjaxId'] });
  • 9. CPS-IT Mehr Wert im Netz 8 Do‘s  Old class names still work due to class mapping  Old hook names still the same  Use signal / slots
  • 10. CPS-IT Mehr Wert im Netz 9 Connect function to signal TYPO3CMSCoreUtilityGeneralUtility::makeInstance('TYPO3CMSExtbaseSignalSlot Dispatcher')->connect( ‘SignalClassName', ‘SignalName’, ‘SlotClassNameOrObject', ‘SlotMethodName' ); Use signal / slots Find signal  Function prefixed with “emit”  Calls dispatch() function from TYPO3CMSExtbaseSignalSlotDispatcher > This way you can introduce own signals
  • 11. CPS-IT Mehr Wert im Netz 10 Don‘ts General  Prevent any logic in ext_autoload.php configuration (e.g. require other files)  No need for t3lib_div::loadTCA() Eid scripts  No need to connect to database by tslib_eidtools::connectDB()
  • 12. CPS-IT Mehr Wert im Netz 11 Don‘ts Extbase  Database driven object are only stored by calling the repository functions or persisted manually by calling $this->objectManager->get( 'TYPO3CMSExtbasePersistenceGenericPersistenceManager‚ )->persistAll();  Disable the backport of the property mapper plugin.tx_cpsblogexample.features.rewrittenPropertyMapper = 0  New functions in TYPO3CMSExtbasePersistenceGenericQuerySettingsInterface
  • 13. CPS-IT Mehr Wert im Netz 12 Thank you for your attention! Contact: @IchHabRecht typo3.slack.com [email protected] cps-it.cordes