SlideShare uma empresa Scribd logo
1 de 19
PiBase Updates
What about piBased Extensions
in TYPO3 6.2,7.6 and future versions
Will it be removed?
• Nope!
There are no plans to remove piBased support from TYPO3
• Its some search&replace of class names and functions to run a
piBased extension in 6.2, 7.6 and even 8LTS
• but you will have to check for PHP version errors as well (7.6
and 8 run on PHP7), as well as other environment
dependencies
I have heard they will remove piBase
support with the next TYPO3 update?
Use piBased Extension
in 6.2 and 7.6
Solution 1: Compatibility Layer
• Install extension: compatibility6
• Problem:
– still some errors can happen
– performance issues
• I never used it, as Solution 2 is easier
Use piBased Extension
in 6.2 and 7.6
Solution 2: Make necessary changes
• ext_emconf.php: Update TYPO3 Version
Number (or accept the installation warning)
• open PHP error log:
tail -f /var/log/apache2/error.log
• install Extension and remove errors:
– search/replace the known errors
– google other error messages:
it is all known and fixed already
Known piBased errors
Error Solution
Call to undefined method loadTCA Remove in ext_tables.php:
t3lib_div::loadTCA("tt_content");
in ext_tables.php
Failed opening required
'PATH_tslibclass.tslib_pibase.php'
remove require statements for TYPO3 core files:
require_once(PATH_tslib.’class.tslib_pibase.php’);
Failed opening required
'class.tslib_content.php'
replace extends class:
Replace 'myclass extends tslib_pibase' with
'myclass extends
TYPO3CMSFrontendPluginAbstractPlugin'
Class 't3lib_div' not found in... replace "t3lib_div" with
TYPO3CMSCoreUtilityGeneralUtility
Class 't3lib_extMgm' not found
in...
replace "t3lib_extMgm" with
TYPO3CMSCoreUtilityExtensionManagementUtility
More Info:
http://blog.scwebs.in/typo3/make-pibase-extension-compatible-to-typo3-6-2-x
Mapping old and new classes
• Mapping of all old and new class names:
https://docs.typo3.org/typo3cms/CoreApiRef
erence/6.2/ApiOverview/Namespaces/
• Scroll down to "ClassAliasMap"
• This can also be found in a 6.2 source in this
file:
typo3/sysext/core/Migrations/Code/ClassAlias
Map.php
Namespaces
• without namespaces, unique class names were like this:
class Tx_MyExtensionName_Controller_ContactController
extends Tx_Extbase_MVC_Controller_ActionController {...}
• with Namespace, it is like this:
namespace VendorMyExtensionNameController;
class ContactController extends
TYPO3CMSExtbaseMvcControllerActionController {...}
• shortcut for long namespaces:
use TYPO3CMSCoreUtilityGeneralUtility;
GeneralUtility::underscoredToUpperCamelCase($var);
• Learn more about Namespaces
– in PHP: http://php.net/manual/en/language.namespaces.php
– in TYPO3: https://docs.typo3.org/typo3cms/CoreApiReference/latest/
ApiOverview/Namespaces/
PiBase to ExtBase
Side-by-Side upgrade code from
piBase to ExtBase
Folder Structure: unchanged
What piBased ExtBase required changes
Extension
Manager
Configuration
ext_emconf.php ext_emconf.php x no
Extension icon ext_icon.gif ext_icon.gif x no
Configuration ext_localconf.php ext_localconf.php same as before
but new
function calls
Configuration ext_tables.php ext_tables.php same as before
but new
function calls
Database SQL
Statements
ext_tables.sql ext_tables.sql no
Folder Structure: moved
What piBased ExtBase changes
TCA tca.php Configuration/TCA/*.php no - but 1 File per
Model
FlexForms flexforms.xml Configuration/FlexForms/
flexforms.xml
no
Typoscript ext_typoscript_
setup.txt
ext_typoscript_
constants.txt
Configuration/TypoScript/* no
Template pi1/
template.html
Resources/Private/Layouts
Resources/Private/Partials
Resources/Private/Templates
yes: Fluid Templates
Language pi1/
locallang.xml
Resources/Private/Language
/locallang.xml
No (but there is a
new .xlf format)
Assets (img,
css, js)
somewhere Resources/Public/* no
Folder Structure: changes
What piBased ExtBase changes
Code pi1, pi2,...
Folder
Classes MVC Pattern
Template pi1/
template.html
Resources/Private/Layouts
Resources/Private/Partials
Resources/Private/Templates
Fluid Templates
Documentation doc/
manual.sxw
Documentation/Manual RESTful Syntax
Example: DCE
Hello World!
• piBase:
– tx_extname_pi1->main():
$message = 'Hello World!';
$output = marker replace ###MESSAGE### with $message
return $this->pi_wrapInBaseClass($output);
– template.html
<h1>###MESSAGE###</h1>
• ExtBase:
– ItemController->mainAction():
$message = 'Hello World!';
$this->view->assign('message',$message);
– View → MainAction.html
<h1>{message}</h1>
MVC: Controller and Actions
piBased: use GET Parameter to controll program flow
switch($param) {
case 'list': ...
case 'show': ...
default: …
}
Ext Base: listAction, showAction, dashboardAction
www.domain.de?tx_myext[action]=list&
tx_myext[controller]=Product
Instead of pi1, pi2, pi3, pi4:
use now a logical structure in Controller and Actions
MVC: Views und Fluid
Replaces the old marker system
Fluid is a template language like Smarty or Twig
https://docs.typo3.org/typo3cms/ExtbaseGuide/Fluid/ViewH
elper
MVC: Model
• Classes folder contains:
– Controller
– Domain
• Model: Data Objects with getter and setter methods
• Repository: Database functions
– other folders - as much as you want
Here it is possible to reuse some important classes
from your piBase Extension. Check "autoload"
syntax for include
Important Functions
piBased ExtBase
$this->piVars $this->request->getArguments();
new classname $this->objectManager->get('classname');
TypoScript Parameter plugin.tx_myext.settings {
param1 = 12345
}
$this->settings['param1']
Redirect Redirect auf showAction im gleichen
Controller:
$this->redirect('show')
weitere Parameter für andere Controller, etc.
Links ($this->pi_getPageLink, pi_linkToPage,...) $this->uriBuilder->reset();
$link = $this->uriBuilder-
>uriFor('show',$params);
viele weitere Funktionen in der UriBuilder
Klasse
Important Functions
piBased ExtBase
$this->pi_getLL TYPO3CMSExtbaseUtilityLocalizationUtility
::translate('your_label_key','your_extensionNa
me');
t3lib_div und t3lib_utility Funktionen TYPO3CMSCoreUtilityGeneralUtility
https://docs.typo3.org/typo3cms/CoreApiRefer
ence/ApiOverview/MainClasses/UsefulFunctio
ns/Index.html
t3lib_extMgm TYPO3CMSCoreUtilityExtensionManageme
ntUtility
$this->cObj 1) Check if there is already ExtBase solution for
your Problem
2) $this->configurationManager-
>getContentObject();
Language Handling
• Files moved to:
Resources/Private/Language/locallang.xml or .xlf
• in View: Fluid Tag
<f:translate key="your_label_key" />
• piBased:
$this->pi_getLL('your_label_key')
• ExtBase:
TYPO3CMSExtbaseUtilityLocalizationUtil
ity::translate('your_label_key','your_exte
nsionName');

Mais conteúdo relacionado

Mais procurados

Working with Hive Analytics
Working with Hive AnalyticsWorking with Hive Analytics
Working with Hive AnalyticsManish Chopra
 
Using Search API, Search API Solr and Facets in Drupal 8
Using Search API, Search API Solr and Facets in Drupal 8Using Search API, Search API Solr and Facets in Drupal 8
Using Search API, Search API Solr and Facets in Drupal 8Websolutions Agency
 
20100707 e z_rmll_gig_v1
20100707 e z_rmll_gig_v120100707 e z_rmll_gig_v1
20100707 e z_rmll_gig_v1Gilles Guirand
 
Gestione della configurazione in Drupal 8
Gestione della configurazione in Drupal 8Gestione della configurazione in Drupal 8
Gestione della configurazione in Drupal 8Eugenio Minardi
 
Sql injection with sqlmap
Sql injection with sqlmapSql injection with sqlmap
Sql injection with sqlmapHerman Duarte
 
20110606 e z_flow_gig_v1
20110606 e z_flow_gig_v120110606 e z_flow_gig_v1
20110606 e z_flow_gig_v1Gilles Guirand
 
What's new in TYPO3 6.2 LTS - #certiFUNcation Alumni Event 05.06.2015
What's new in TYPO3 6.2 LTS - #certiFUNcation Alumni Event 05.06.2015What's new in TYPO3 6.2 LTS - #certiFUNcation Alumni Event 05.06.2015
What's new in TYPO3 6.2 LTS - #certiFUNcation Alumni Event 05.06.2015die.agilen GmbH
 
Drupal 8 - Corso frontend development
Drupal 8 - Corso frontend developmentDrupal 8 - Corso frontend development
Drupal 8 - Corso frontend developmentsparkfabrik
 
Drupal 8 CMI on a Managed Workflow
Drupal 8 CMI on a Managed WorkflowDrupal 8 CMI on a Managed Workflow
Drupal 8 CMI on a Managed WorkflowPantheon
 
13 things every developer should know about their database to run word press ...
13 things every developer should know about their database to run word press ...13 things every developer should know about their database to run word press ...
13 things every developer should know about their database to run word press ...Seravo
 
Drupal 8. Search API. Facets. Customize / combine facets
Drupal 8. Search API. Facets. Customize / combine facetsDrupal 8. Search API. Facets. Customize / combine facets
Drupal 8. Search API. Facets. Customize / combine facetsAnyforSoft
 
Building your own search engine with Apache Solr
Building your own search engine with Apache SolrBuilding your own search engine with Apache Solr
Building your own search engine with Apache SolrBiogeeks
 
Introduction Apache Solr & PHP
Introduction Apache Solr & PHPIntroduction Apache Solr & PHP
Introduction Apache Solr & PHPHiraq Citra M
 
Intro to drupal module internals asheville
Intro to drupal module internals ashevilleIntro to drupal module internals asheville
Intro to drupal module internals ashevillecgmonroe
 
20100622 e z_find_slides_gig_v2.1
20100622 e z_find_slides_gig_v2.120100622 e z_find_slides_gig_v2.1
20100622 e z_find_slides_gig_v2.1Gilles Guirand
 
Faceted Search with Lucene
Faceted Search with LuceneFaceted Search with Lucene
Faceted Search with Lucenelucenerevolution
 
Mid term &amp; final- preparation- student-review(Oracle)
Mid term &amp; final- preparation- student-review(Oracle)Mid term &amp; final- preparation- student-review(Oracle)
Mid term &amp; final- preparation- student-review(Oracle)than sare
 

Mais procurados (20)

Working with Hive Analytics
Working with Hive AnalyticsWorking with Hive Analytics
Working with Hive Analytics
 
Using Search API, Search API Solr and Facets in Drupal 8
Using Search API, Search API Solr and Facets in Drupal 8Using Search API, Search API Solr and Facets in Drupal 8
Using Search API, Search API Solr and Facets in Drupal 8
 
20100707 e z_rmll_gig_v1
20100707 e z_rmll_gig_v120100707 e z_rmll_gig_v1
20100707 e z_rmll_gig_v1
 
Gestione della configurazione in Drupal 8
Gestione della configurazione in Drupal 8Gestione della configurazione in Drupal 8
Gestione della configurazione in Drupal 8
 
Sql injection with sqlmap
Sql injection with sqlmapSql injection with sqlmap
Sql injection with sqlmap
 
20110606 e z_flow_gig_v1
20110606 e z_flow_gig_v120110606 e z_flow_gig_v1
20110606 e z_flow_gig_v1
 
What's new in TYPO3 6.2 LTS - #certiFUNcation Alumni Event 05.06.2015
What's new in TYPO3 6.2 LTS - #certiFUNcation Alumni Event 05.06.2015What's new in TYPO3 6.2 LTS - #certiFUNcation Alumni Event 05.06.2015
What's new in TYPO3 6.2 LTS - #certiFUNcation Alumni Event 05.06.2015
 
Drupal 8 - Corso frontend development
Drupal 8 - Corso frontend developmentDrupal 8 - Corso frontend development
Drupal 8 - Corso frontend development
 
Drupal 8 CMI on a Managed Workflow
Drupal 8 CMI on a Managed WorkflowDrupal 8 CMI on a Managed Workflow
Drupal 8 CMI on a Managed Workflow
 
13 things every developer should know about their database to run word press ...
13 things every developer should know about their database to run word press ...13 things every developer should know about their database to run word press ...
13 things every developer should know about their database to run word press ...
 
Drupal 8. Search API. Facets. Customize / combine facets
Drupal 8. Search API. Facets. Customize / combine facetsDrupal 8. Search API. Facets. Customize / combine facets
Drupal 8. Search API. Facets. Customize / combine facets
 
Building your own search engine with Apache Solr
Building your own search engine with Apache SolrBuilding your own search engine with Apache Solr
Building your own search engine with Apache Solr
 
Introduction Apache Solr & PHP
Introduction Apache Solr & PHPIntroduction Apache Solr & PHP
Introduction Apache Solr & PHP
 
Intro to drupal module internals asheville
Intro to drupal module internals ashevilleIntro to drupal module internals asheville
Intro to drupal module internals asheville
 
SQL/MED and PostgreSQL
SQL/MED and PostgreSQLSQL/MED and PostgreSQL
SQL/MED and PostgreSQL
 
20100622 e z_find_slides_gig_v2.1
20100622 e z_find_slides_gig_v2.120100622 e z_find_slides_gig_v2.1
20100622 e z_find_slides_gig_v2.1
 
Faceted Search with Lucene
Faceted Search with LuceneFaceted Search with Lucene
Faceted Search with Lucene
 
Apache Solr
Apache SolrApache Solr
Apache Solr
 
Apachepoitutorial
ApachepoitutorialApachepoitutorial
Apachepoitutorial
 
Mid term &amp; final- preparation- student-review(Oracle)
Mid term &amp; final- preparation- student-review(Oracle)Mid term &amp; final- preparation- student-review(Oracle)
Mid term &amp; final- preparation- student-review(Oracle)
 

Semelhante a PiBase Updates

Upgrade von TYPO3 4.5 auf 6.2 - CertiFUNcation Phantasialand 2015
Upgrade von TYPO3 4.5 auf 6.2 - CertiFUNcation Phantasialand 2015Upgrade von TYPO3 4.5 auf 6.2 - CertiFUNcation Phantasialand 2015
Upgrade von TYPO3 4.5 auf 6.2 - CertiFUNcation Phantasialand 2015Wolfgang Wagner
 
Yocto: Training in English
Yocto: Training in EnglishYocto: Training in English
Yocto: Training in EnglishOtavio Salvador
 
XPages -Beyond the Basics
XPages -Beyond the BasicsXPages -Beyond the Basics
XPages -Beyond the BasicsUlrich Krause
 
Deployment with ExpressionEngine
Deployment with ExpressionEngineDeployment with ExpressionEngine
Deployment with ExpressionEngineGreen Egg Media
 
Handling Database Deployments
Handling Database DeploymentsHandling Database Deployments
Handling Database DeploymentsMike Willbanks
 
Expanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityExpanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityTeamstudio
 
Managing Plone Projects with Perl and Subversion
Managing Plone Projects with Perl and SubversionManaging Plone Projects with Perl and Subversion
Managing Plone Projects with Perl and SubversionLuciano Rocha
 
[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the BasicsUlrich Krause
 
Step by-step process guide for alfresco migration from 5.x to 6.0
Step by-step process guide for alfresco migration from 5.x to 6.0Step by-step process guide for alfresco migration from 5.x to 6.0
Step by-step process guide for alfresco migration from 5.x to 6.0ContCentric IT Services Pvt Ltd
 
Python Requirements File How to Create Python requirements.txt
Python Requirements File How to Create Python requirements.txtPython Requirements File How to Create Python requirements.txt
Python Requirements File How to Create Python requirements.txtInexture Solutions
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github Max Claus Nunes
 
Introduction to yocto
Introduction to yoctoIntroduction to yocto
Introduction to yoctoAlex Gonzalez
 
[2015/2016] Collaborative software development with Git
[2015/2016] Collaborative software development with Git[2015/2016] Collaborative software development with Git
[2015/2016] Collaborative software development with GitIvano Malavolta
 
Upgrading to MySQL 8.0 webinar slides November 27th, 2019
Upgrading to MySQL 8.0 webinar slides November 27th, 2019Upgrading to MySQL 8.0 webinar slides November 27th, 2019
Upgrading to MySQL 8.0 webinar slides November 27th, 2019Dave Stokes
 

Semelhante a PiBase Updates (20)

vvvvReadme
vvvvReadmevvvvReadme
vvvvReadme
 
Upgrade von TYPO3 4.5 auf 6.2 - CertiFUNcation Phantasialand 2015
Upgrade von TYPO3 4.5 auf 6.2 - CertiFUNcation Phantasialand 2015Upgrade von TYPO3 4.5 auf 6.2 - CertiFUNcation Phantasialand 2015
Upgrade von TYPO3 4.5 auf 6.2 - CertiFUNcation Phantasialand 2015
 
Yocto: Training in English
Yocto: Training in EnglishYocto: Training in English
Yocto: Training in English
 
XPages -Beyond the Basics
XPages -Beyond the BasicsXPages -Beyond the Basics
XPages -Beyond the Basics
 
Git workshop
Git workshopGit workshop
Git workshop
 
Deployment with ExpressionEngine
Deployment with ExpressionEngineDeployment with ExpressionEngine
Deployment with ExpressionEngine
 
Handling Database Deployments
Handling Database DeploymentsHandling Database Deployments
Handling Database Deployments
 
Expanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate UsabilityExpanding XPages with Bootstrap Plugins for Ultimate Usability
Expanding XPages with Bootstrap Plugins for Ultimate Usability
 
Managing Plone Projects with Perl and Subversion
Managing Plone Projects with Perl and SubversionManaging Plone Projects with Perl and Subversion
Managing Plone Projects with Perl and Subversion
 
Test
TestTest
Test
 
[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics[DanNotes] XPages - Beyound the Basics
[DanNotes] XPages - Beyound the Basics
 
Step by-step process guide for alfresco migration from 5.x to 6.0
Step by-step process guide for alfresco migration from 5.x to 6.0Step by-step process guide for alfresco migration from 5.x to 6.0
Step by-step process guide for alfresco migration from 5.x to 6.0
 
GIT_Overview.
GIT_Overview.GIT_Overview.
GIT_Overview.
 
Fossil scm overview
Fossil scm overviewFossil scm overview
Fossil scm overview
 
Python Requirements File How to Create Python requirements.txt
Python Requirements File How to Create Python requirements.txtPython Requirements File How to Create Python requirements.txt
Python Requirements File How to Create Python requirements.txt
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github
 
Introduction to yocto
Introduction to yoctoIntroduction to yocto
Introduction to yocto
 
AtoZ about TYPO3 v8 CMS
AtoZ about TYPO3 v8 CMSAtoZ about TYPO3 v8 CMS
AtoZ about TYPO3 v8 CMS
 
[2015/2016] Collaborative software development with Git
[2015/2016] Collaborative software development with Git[2015/2016] Collaborative software development with Git
[2015/2016] Collaborative software development with Git
 
Upgrading to MySQL 8.0 webinar slides November 27th, 2019
Upgrading to MySQL 8.0 webinar slides November 27th, 2019Upgrading to MySQL 8.0 webinar slides November 27th, 2019
Upgrading to MySQL 8.0 webinar slides November 27th, 2019
 

Último

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 

Último (20)

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 

PiBase Updates

  • 1. PiBase Updates What about piBased Extensions in TYPO3 6.2,7.6 and future versions
  • 2. Will it be removed? • Nope! There are no plans to remove piBased support from TYPO3 • Its some search&replace of class names and functions to run a piBased extension in 6.2, 7.6 and even 8LTS • but you will have to check for PHP version errors as well (7.6 and 8 run on PHP7), as well as other environment dependencies I have heard they will remove piBase support with the next TYPO3 update?
  • 3. Use piBased Extension in 6.2 and 7.6 Solution 1: Compatibility Layer • Install extension: compatibility6 • Problem: – still some errors can happen – performance issues • I never used it, as Solution 2 is easier
  • 4. Use piBased Extension in 6.2 and 7.6 Solution 2: Make necessary changes • ext_emconf.php: Update TYPO3 Version Number (or accept the installation warning) • open PHP error log: tail -f /var/log/apache2/error.log • install Extension and remove errors: – search/replace the known errors – google other error messages: it is all known and fixed already
  • 5. Known piBased errors Error Solution Call to undefined method loadTCA Remove in ext_tables.php: t3lib_div::loadTCA("tt_content"); in ext_tables.php Failed opening required 'PATH_tslibclass.tslib_pibase.php' remove require statements for TYPO3 core files: require_once(PATH_tslib.’class.tslib_pibase.php’); Failed opening required 'class.tslib_content.php' replace extends class: Replace 'myclass extends tslib_pibase' with 'myclass extends TYPO3CMSFrontendPluginAbstractPlugin' Class 't3lib_div' not found in... replace "t3lib_div" with TYPO3CMSCoreUtilityGeneralUtility Class 't3lib_extMgm' not found in... replace "t3lib_extMgm" with TYPO3CMSCoreUtilityExtensionManagementUtility More Info: http://blog.scwebs.in/typo3/make-pibase-extension-compatible-to-typo3-6-2-x
  • 6. Mapping old and new classes • Mapping of all old and new class names: https://docs.typo3.org/typo3cms/CoreApiRef erence/6.2/ApiOverview/Namespaces/ • Scroll down to "ClassAliasMap" • This can also be found in a 6.2 source in this file: typo3/sysext/core/Migrations/Code/ClassAlias Map.php
  • 7. Namespaces • without namespaces, unique class names were like this: class Tx_MyExtensionName_Controller_ContactController extends Tx_Extbase_MVC_Controller_ActionController {...} • with Namespace, it is like this: namespace VendorMyExtensionNameController; class ContactController extends TYPO3CMSExtbaseMvcControllerActionController {...} • shortcut for long namespaces: use TYPO3CMSCoreUtilityGeneralUtility; GeneralUtility::underscoredToUpperCamelCase($var); • Learn more about Namespaces – in PHP: http://php.net/manual/en/language.namespaces.php – in TYPO3: https://docs.typo3.org/typo3cms/CoreApiReference/latest/ ApiOverview/Namespaces/
  • 8. PiBase to ExtBase Side-by-Side upgrade code from piBase to ExtBase
  • 9. Folder Structure: unchanged What piBased ExtBase required changes Extension Manager Configuration ext_emconf.php ext_emconf.php x no Extension icon ext_icon.gif ext_icon.gif x no Configuration ext_localconf.php ext_localconf.php same as before but new function calls Configuration ext_tables.php ext_tables.php same as before but new function calls Database SQL Statements ext_tables.sql ext_tables.sql no
  • 10. Folder Structure: moved What piBased ExtBase changes TCA tca.php Configuration/TCA/*.php no - but 1 File per Model FlexForms flexforms.xml Configuration/FlexForms/ flexforms.xml no Typoscript ext_typoscript_ setup.txt ext_typoscript_ constants.txt Configuration/TypoScript/* no Template pi1/ template.html Resources/Private/Layouts Resources/Private/Partials Resources/Private/Templates yes: Fluid Templates Language pi1/ locallang.xml Resources/Private/Language /locallang.xml No (but there is a new .xlf format) Assets (img, css, js) somewhere Resources/Public/* no
  • 11. Folder Structure: changes What piBased ExtBase changes Code pi1, pi2,... Folder Classes MVC Pattern Template pi1/ template.html Resources/Private/Layouts Resources/Private/Partials Resources/Private/Templates Fluid Templates Documentation doc/ manual.sxw Documentation/Manual RESTful Syntax
  • 13. Hello World! • piBase: – tx_extname_pi1->main(): $message = 'Hello World!'; $output = marker replace ###MESSAGE### with $message return $this->pi_wrapInBaseClass($output); – template.html <h1>###MESSAGE###</h1> • ExtBase: – ItemController->mainAction(): $message = 'Hello World!'; $this->view->assign('message',$message); – View → MainAction.html <h1>{message}</h1>
  • 14. MVC: Controller and Actions piBased: use GET Parameter to controll program flow switch($param) { case 'list': ... case 'show': ... default: … } Ext Base: listAction, showAction, dashboardAction www.domain.de?tx_myext[action]=list& tx_myext[controller]=Product Instead of pi1, pi2, pi3, pi4: use now a logical structure in Controller and Actions
  • 15. MVC: Views und Fluid Replaces the old marker system Fluid is a template language like Smarty or Twig https://docs.typo3.org/typo3cms/ExtbaseGuide/Fluid/ViewH elper
  • 16. MVC: Model • Classes folder contains: – Controller – Domain • Model: Data Objects with getter and setter methods • Repository: Database functions – other folders - as much as you want Here it is possible to reuse some important classes from your piBase Extension. Check "autoload" syntax for include
  • 17. Important Functions piBased ExtBase $this->piVars $this->request->getArguments(); new classname $this->objectManager->get('classname'); TypoScript Parameter plugin.tx_myext.settings { param1 = 12345 } $this->settings['param1'] Redirect Redirect auf showAction im gleichen Controller: $this->redirect('show') weitere Parameter für andere Controller, etc. Links ($this->pi_getPageLink, pi_linkToPage,...) $this->uriBuilder->reset(); $link = $this->uriBuilder- >uriFor('show',$params); viele weitere Funktionen in der UriBuilder Klasse
  • 18. Important Functions piBased ExtBase $this->pi_getLL TYPO3CMSExtbaseUtilityLocalizationUtility ::translate('your_label_key','your_extensionNa me'); t3lib_div und t3lib_utility Funktionen TYPO3CMSCoreUtilityGeneralUtility https://docs.typo3.org/typo3cms/CoreApiRefer ence/ApiOverview/MainClasses/UsefulFunctio ns/Index.html t3lib_extMgm TYPO3CMSCoreUtilityExtensionManageme ntUtility $this->cObj 1) Check if there is already ExtBase solution for your Problem 2) $this->configurationManager- >getContentObject();
  • 19. Language Handling • Files moved to: Resources/Private/Language/locallang.xml or .xlf • in View: Fluid Tag <f:translate key="your_label_key" /> • piBased: $this->pi_getLL('your_label_key') • ExtBase: TYPO3CMSExtbaseUtilityLocalizationUtil ity::translate('your_label_key','your_exte nsionName');