Click here to load reader

TYPO3 6.0. What's new

  • View
    10.227

  • Download
    4

Embed Size (px)

DESCRIPTION

Great document created by Patrick Lobacher and Michael Schams.

Text of TYPO3 6.0. What's new

  • 1.TYPO3 CMS 6.0Whats NewA quick summary of thefeatures, changes and improvementsv20121122 - Creative Commons BY-NC-SA 3.0

2. Chapter Overview File Abstraction Layer (FAL) API Extension Manager (EM) Internal Changes LocalConfiguration Extbase & Fluid General Changes Hooks Rich Text Editor (RTE) Deprecated Functions TypoScript & TSconfig Upgrade Namespaces TYPO3 Branding Logging API SourcesTYPO3 CMS 6.0 - Whats New 3. IntroductionTYPO3 CMS 6.0 Back to the Future Get back on track and embrace the future! Enhance user experience Improve and ensure code quality Increase overall security Encourage and strengthen collaboration Release team:Helmut Hummel, Susanne Moog, Christian KuhnTYPO3 CMS 6.0 - Whats New 4. IntroductionTYPO3 CMS 6.0 Back to the Future Release date: 27 November 2012 (re-scheduled from end of October 2012)TYPO3 CMS 6.0 - Whats New 5. IntroductionTYPO3 CMS 6.0 Back to the Future System Requirements PHP v5.3.x v5.4.x MySQL v5.1.x v5.5.x (compatibility for MySQL v5.0.x has been dropped) Maintenance up to April 2014TYPO3 CMS 6.0 - Whats New 6. Chapter 1 File Abstraction Layer(FAL)TYPO3 CMS 6.0 - Whats New 7. File Abstraction Layer (FAL) Low-level file handling through database Not media management (not a DAM replacement) Kick-off at TYPO3 Developer Days in 2010 Mainly developed by: Benjamin Mack, Steffen Ritter, Ingmar Schlecht, Andreas Wolf Part of the BLE project 2011 Current state: third iterationTYPO3 CMS 6.0 - Whats New 8. File Abstraction Layer (FAL) General concept: No copies of files but references only Storages are storage containers (remote or local) Drivers build storage type (WebDAV, cloud services, etc.) Images as IRRE records, including meta dataUsage Layer(file reference) Storage Layer (file/folder storage)Mount PointDriver LayerLow-level interface(driver)system callsTYPO3 CMS 6.0 - Whats New 9. File Abstraction Layer (FAL) Example: CE text with imageTYPO3 CMS 6.0 - Whats New 10. File Abstraction Layer (FAL) Example: CE text with image Create media records via IRRE Drag and drop Enter meta dataTYPO3 CMS 6.0 - Whats New 11. File Abstraction Layer (FAL) Example: Fileadmin edit meta dataTYPO3 CMS 6.0 - Whats New 12. File Abstraction Layer (FAL) FAL drivers specify storage type For example: Local Provided by TYPO3 CMS out-of-the-box WebDAV http://forge.typo3.org/projects/show/extension-fal_webdav Amazon S3 http://forge.typo3.org/projects/show/extension-fal_amazons3TYPO3 CMS 6.0 - Whats New 13. File Abstraction Layer (FAL) FAL Scheduler Task indexes filesTYPO3 CMS 6.0 - Whats New 14. File Abstraction Layer (FAL) Create File Collections by system records Static selection of files or Folder from StorageTYPO3 CMS 6.0 - Whats New 15. File Abstraction Layer (FAL) Referencing of File Collections (e.g. content object File Links)TYPO3 CMS 6.0 - Whats New 16. File Abstraction Layer (FAL) Create File Storage by system recordsTYPO3 CMS 6.0 - Whats New 17. File Abstraction Layer (FAL) Select File Storage (e.g. at Filemount)TYPO3 CMS 6.0 - Whats New 18. File Abstraction Layer (FAL) New database tables: sys_file Reflects all files tracked by TYPO3 CMS, including meta data sys_file_collection Reflects a list of records from sys_file table sys_file_processedfile Temporary files, e.g. thumbnails, previews, etc. sys_file_reference Builds the relation between a sys_file record and the usage of the records somewhere in TYPO3 CMS (e.g. tt_content) sys_file_storage Defines the access to the storage type/driver (e.g. local, WebDAV, Amazon S3, etc.)TYPO3 CMS 6.0 - Whats New 19. File Abstraction Layer (FAL)Coding example: file copy$storageUid = 17;$someFileIdentifier = templates/images/banner.jpg;$someFolderIdentifier = website/images/;$storageRepository = TYPO3CMSCoreUtilityGeneralUtility::makeInstance(TYPO3CMSCoreRessourceStorageRepository);$storage = $storageRepository->getByUid($storageUid)// returns a t3lib_file_File object$file = $storage->getFile($someFileIdentifier);// returns a t3lib_file_File object$folder = $storage->getFolder($someFolderIdentifier);// returns the t3lib_file_File object of the new, copied file$file->copyTo($folder);// or equivalent$folder->addCopyOfFile($file);TYPO3 CMS 6.0 - Whats New 20. File Abstraction Layer (FAL)Coding example: read file list of a directory$storageRepository = TYPO3CMSCoreUtilityGeneralUtility::makeInstance(t3lib_file_StorageRepository);$availableStorages = $storageRepository->findAll();foreach($availableStorages as $storage) {$rootFolder = $storage->getRootFolder();$subFolders = $rootFolder->getSubFolders();foreach($subFolders as $subFolder) {$filesInSubFolder = $subFolder->getFiles();$foldersInSubFolder = $subFolder->getSubFolders();...}}TYPO3 CMS 6.0 - Whats New 21. File Abstraction Layer (FAL)General API:getPublicUrl(TYPO3CMSCoreResourceResourceInterface $fileOrFolder,$relativeToCurrentScript = FALSE)isPathValid($theFile)sanitizeFileName($fileName, $charset = )getAbsolutePath($file)getLowLevelFileInfo(TYPO3CMSCoreResourceFileInterface $file)hash(TYPO3CMSCoreResourceFileInterface $file, $hashAlgorithm)resourceExists($identifier)fileExists($identifier)fileExistsInFolder($fileName, TYPO3CMSCoreResourceFolder $folder)folderExists($identifier)folderExistsInFolder($folderName, TYPO3CMSCoreResourceFolder $folder)TYPO3 CMS 6.0 - Whats New 22. File Abstraction Layer (FAL)Storage API (1/2):addFile($localFilePath, TYPO3CMSCoreResourceFolder $targetFolder,$fileName, TYPO3CMSCoreResourceAbstractFile $updateFileObject = NULL)createFile($fileName, TYPO3CMSCoreResourceFolder $parentFolder)getFile($identifier)getFileList($path, $start = 0, $numberOfItems = 0, $useFilters = TRUE,$loadIndexRecords = TRUE)hasFile($identifier)getFileContents(TYPO3CMSCoreResourceFileInterface $file)setFileContents(TYPO3CMSCoreResourceFileInterface $file, $contents)deleteFile(TYPO3CMSCoreResourceFileInterface $file)copyFile(TYPO3CMSCoreResourceFileInterface $file,TYPO3CMSCoreResourceFolder$targetFolder, $targetFileName = NULL,$conflictMode = renameNewFile)copyFileWithinStorage(TYPO3CMSCoreResourceFileInterface $file,TYPO3CMSCoreResourceFolder $targetFolder, $fileName)TYPO3 CMS 6.0 - Whats New 23. File Abstraction Layer (FAL)Storage API (2/2):copyFileToTemporaryPath(TYPO3CMSCoreResourceFileInterface $file)moveFile($file, $targetFolder, $targetFileName = NULL, $conflictMode =renameNewFile)moveFileWithinStorage(TYPO3CMSCoreResourceFileInterface $file,TYPO3CMSCoreResourceFolder $targetFolder, $fileName)renameFile(TYPO3CMSCoreResourceFileInterface $file, $newName)updateFile(TYPO3CMSCoreResourceAbstractFile $file, $identifier = ,$storage = NULL)replaceFile(TYPO3CMSCoreResourceFileInterface $file, $localFilePath)getFileForLocalProcessing(TYPO3CMSCoreResourceFileInterface $fileObject,$writable = TRUE)getFileInfoByIdentifier($fileIdentifier)getFileInfo($identifier)getFilePermissions(TYPO3CMSCoreResourceFileInterface $file)TYPO3 CMS 6.0 - Whats New 24. File Abstraction Layer (FAL)Folder API:getRootLevelFolder()getDefaultFolder()createFolder($newFolderName, TYPO3CMSCoreResourceFolder $parentFolder)getFolderInFolder($name, TYPO3CMSCoreResourceFolder $parentFolder)moveFolderWithinStorage(TYPO3CMSCoreResourceFolder $folderToMove,TYPO3CMSCoreResourceFolder $targetFolder, $newFolderName)copyFolderWithinStorage(TYPO3CMSCoreResourceFolder $folderToCopy,TYPO3CMSCoreResourceFolder $targetFolder, $newFolderName)renameFolder(TYPO3CMSCoreResourceFolder $folder, $newName)deleteFolder(TYPO3CMSCoreResourceFolder $folder, $deleteRecursively =FALSE)isFolderEmpty(TYPO3CMSCoreResourceFolder $folder)getFolderPermissions(TYPO3CMSCoreResourceFolder $folder)isWithin(TYPO3CMSCoreResourceFolder $container, $content)TYPO3 CMS 6.0 - Whats New 25. File Abstraction Layer (FAL) FAL TypoScript: access details of file(s) getText data = file:[UID|current]:[fieldName] For example: page.10.data = file:current:title or: page.10.data = file:42:titleTYPO3 CMS 6.0 - Whats New 26. File Abstraction Layer (FAL)FAL TypoScript: cObject FILES20 = FILES20 {references {table = pagesuid.data = page:uidfieldName = media}# or: sys_file_references with UID 42:references = 42# UIDs from sys_filesfiles = 12,14,15# with stdWrapfiles.field = some_fieldcollections.field = file_collectionsfolders.field = select_keyrenderObj = COArenderObj {10 = IMAGE10 {file.import.data = file:current:originalUid // file:current:uidfile.width = 150...}}TYPO3 CMS 6.0 - Whats New 27. Chapter 2 Extension Manager(EM)TYPO3 CMS 6.0 - Whats New 28. Extension Manager (EM) (Re-)written from scratch (third iteration) Uses Extbase Significantly streamlined Language handling separated (extension lang) File editing functionality excluded (can be handled by other extensions) Extension upload functionality separated (extension extdeveval)TYPO3 CMS 6.0 - Whats New 29. Extension Manager (EM)TYPO3 CMS 6.0 - Whats New 30. Extension Manager (EM)TYPO3 CMS 6.0 - Whats New 31. Extension Manager (EM) Multiple repositories not supported (yet) (currently TYPO3.org Main Repository is the only entry) Database tables Before: cache_extensions sys_ter Now: tx_extensionmanager_domain_model_extension tx_extensionmanager_domain_model_repositoryTYPO3 CMS 6.0 - Whats New 32. Chapter 3 LocalConfigurationTYPO3 CMS 6.0 - Whats New 33. LocalConfiguration New global configuration file Before: typo3conf/localconf.php Now: typo3conf/LocalConfiguration.php Configuration changes (for example triggered by EM) force a re-generation of the file Custom code is not allowed in this file Use: typo3conf/AdditionalConfiguration.php Update Wizard converts localconf.php to LocalConfiguration.php automaticallyTYPO3 CMS 6.0 - Whats New 34. LocalConfigurationTypical content of typo3conf/LocalConfiguration.phpreturn array( BE => array(disable_exec_function => 0,... ), DB => array(database => typo3_600b1,... ), EXT => array(extConf => array(automaketemplate => a:0:{},... ), extList =>