Translations
Info
All page names need to be in English.
en da  de  fr  it  ja  km  nl  ru  zh

TYPO3.CMS/Releases/7.5/Feature

From TYPO3Wiki
Jump to: navigation, search

Contents

Feature: #16525 - Add conditions to INCLUDE_TYPOSCRIPT

Description

The INCLUDE_TYPOSCRIPT tag now has an extra (optional) property "condition" which causes the file/directory to be included only if the condition is met.

As usual a condition is enclosed in square brackets, but if these are not present they will be added. Any double quotes must be escaped by adding backslashes and any backslash must be doubled.

Example

<INCLUDE_TYPOSCRIPT: source="FILE:EXT:my_extension/Configuration/TypoScript/firefox.ts" condition="[loginUser = *]">

Condition with square brackets. File will only be included if a frontend user is logged in.

<INCLUDE_TYPOSCRIPT: source="FILE:EXT:my_extension/Configuration/TypoScript/staging.ts" condition="applicationContext = /^Production\\/Staging\\/Server\\d+$/">

Condition without square brackets, backslashes doubled inside the condition. File will only be included in application context Production/Staging/Server followed by at least one digit.

Feature: #19494 - Add SELECTmmQuery method to DatabaseConnection

Description

A new method SELECT_mm_query has been added to the DatabaseConnection class. This method has been extracted from exec_SELECT_mm_query to separate the building and execution of M:M queries.

This enables the use of the query building in the database abstraction layer.

Example:

$query = SELECT_mm_query('*', 'table1', 'table1_table2_mm', 'table2', 'AND table1.uid = 1', '', 'table1.title DESC');

Feature: #25341 - Scheduler task to optimize database tables

Description

A scheduler task to run the OPTIMIZE TABLE command on selected database tables has been added. The OPTIMIZE TABLE command reorganizes the physical storage of table data and associated index data to reduce storage space and improve I/O efficiency when accessing the table. The exact changes made to each table depend on the storage engine used by that table. For more information see the MySQL manual.

The scheduler task is meant for the MySQL database system and only shows tables matching the MySQL storage engines MyISAM, InnoDB and ARCHIVE. Using this task with DBAL and other DBMS is not supported as the commands used are MySQL specific.

Impact

Optimizing tables is I/O intensive. On MySQL < 5.6.17 it also locks the tables for the whole time, which can severely impact the website while it is running. When considering whether or not to run optimize, consider the workload of transactions that your server will process as InnoDB tables do not suffer from fragmentation in the same way that MyISAM tables do.

Feature: #28243 - Introduce TCA option to disable age display of dates per field

Description

It is now possible to disable the display of the age (p.e. "2015-08-30 (-27 days)") of date fields in record listings by a new TCA option. The option is called disableAgeDisplay and can be set in the config section of a field. It will be respected if the field has the type input and its eval is set to date.

Example

// disables the display of &quot; (-27 days)&quot; p.e.
$GLOBALS['TCA']['tt_content']['columns']['date']['config']['disableAgeDisplay'] = true;

Feature: #31100 - Integrate multiline support for TEXTBLOCK in form wizard

Description

The form object TEXTBLOCK is now rendered as multiline input field in the form wizard. Line breaks are automatically converted to <br> tags in the wizard preview and the frontend.

Feature: #38732 - Fluid-based Content Elements Introduced

Description

A new system extension called "Fluid Styled Content" has been added to the core, which ships with a trimmed down and simplified set of Content Elements which are rendered by Fluid Templates. This extension is installed by default on new installations.

In order to have Fluid Styled Content running, add the TypoScript file inside the Template module, and the PageTSconfig file on the page properties.

It is possible to overwrite the templates by adding your own paths in the TypoScript setup:

lib.fluidContent.templateRootPaths.50 = EXT:site_example/Resources/Private/Templates/
lib.fluidContent.partialRootPaths.50 = EXT:site_example/Resources/Private/Partials/
lib.fluidContent.layoutRootPaths.50 = EXT:site_example/Resources/Private/Layouts/

The new CType textmedia adds support for rendering media elements and image elements side by side.

Impact

Please note that this extension is still in an early stage and breaking changes are still possible until TYPO3 CMS 7 LTS, so be aware of changes to TCA, Templates, Behaviour and Feature set.

Some conflicts regarding CSS Styled Content and Fluid Styled Content might still exist.

Feature: #47812 - Query support for BETWEEN added

Description

Support for between has been added to the Extbase Query object. As there is no performance advantage to using BETWEEN on the DBMS side (the optimizer converts it to (min <= expr AND expr <= max) this function replicates the DBMS behaviour by building a logical AND condition that has the advantage of working on all DBMS.

Example:

$query->matching(
    $query->between('uid', 3, 5)
);

Feature - #52217: Signal for pre processing linkvalidator records

Description

This signal allows for additional processing upon initialization of a specific record, e.g. getting content data from plugin configuration in record.

Registering the signal: (in ext_localconf.php)

$signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class);
$signalSlotDispatcher->connect(
    \TYPO3\CMS\Linkvalidator\LinkAnalyzer::class,
    'beforeAnalyzeRecord',
    \Vendor\Package\Slots\RecordAnalyzerSlot::class,
    'beforeAnalyzeRecord'
);

The slot class:

namespace Vendor\Package\Slots;

use TYPO3\CMS\Linkvalidator\LinkAnalyzer;

class RecordAnalyzerSlot {

    /**
     * Receives a signal before the record is analyzed
     *
     * @param array $results Array of broken links
     * @param array $record Record to analyse
     * @param string $table Table name of the record
     * @param array $fields Array of fields to analyze
     * @param LinkAnalyzer $parentObject Parent object
     * @return array
     */
    public function beforeAnalyzeRecord($results, $record, $table, $fields, LinkAnalyzer $parentObject) {
        // Processing here
        return array(
            $results,
            $record
        );
    }
}

Impact

Extensions may now perform any kind of processing for every record when validating content links.

Feature: #53406 - Add placeholder attribute to some textfields in wizard

Description

The form wizard is now able to add a placeholder attribute to the following elements: TEXTLINE, TEXTAREA, PASSWORD and the preset "email". TypoScript config is properly read and written.

Feature: #56282 - Language selector for pageview module

Description

The pageview module now has a dropdown to select a language for the page preview.

In case you switch languages based on something different than a parameter called L you can disable the selector by using the following PageTSConfig:

mod.SHARED.view.disableLanguageSelector = 1

Feature: #56726 - Trigger metadata extraction after file upload

Description

Before #56726 the metadata extraction was only called through the extract metadata scheduler task. So when a editor uploaded a new file he had to wait until the scheduler task had been triggered again and extracted the metadata.

Now the metadata extraction is by default triggered after adding/uploading a file in the BE or when the FAL API is used ResourceStorage::addFile(), ResourceStorage::replaceFile() and ResourceStorage::addUploadedFile().

In some special situations it isn't desired to have metadata extraction direct after file upload/adding a file to the storage. For these cases the automatic extraction can be disabled in File Storage configuration.

Impact

The flag is by default set for all existing and a new storage. When you have some special use-case where automatic extraction of metadata is not desired the flag can be disabled in File Storage configuration.

Feature: #57632 - Include inline language label files with TypoScript

Description

It is now possible to add inline language label files with TypoScript.

Usage

If you want to include inline labels from a XLF file, you have to specify that file in your TypoScript with a custom key in the new inlineLanguageLabelFiles section. In addition to the file you can configure three optional parameters:

  • selectionPrefix: Only label keys that start with this prefix will be included (default: )
  • stripFromSelectionName: A string that will be removed from any included label key (default: )
  • errorMode: Error mode if the file could not be found: 0 - syslog entry, 1 - do nothing, 2 - throw an exception (default: 0)

Example

page = PAGE
page.inlineLanguageLabelFiles {
    someLabels = EXT:myExt/Resources/Private/Language/locallang.xlf
    someLabels.selectionPrefix = idPrefix
    someLabels.stripFromSelectionName = strip_me
    someLabels.errorMode = 2
}

Output in the HTML head:

var TYPO3 = TYPO3 || {};
TYPO3.lang = {&quot;firstLabel&quot;:[{&quot;source&quot;:&quot;first Label&quot;,&quot;target&quot;:&quot;erstes Label&quot;}],&quot;secondLabel&quot;:[{&quot;source&quot;:&quot;second Label&quot;,&quot;target&quot;:&quot;zweites Label&quot;}]};

Feature: #59144 - Previewing workspace records using Page TSconfig

Description

Per default TYPO3 only creates preview links for the tables tt_content, pages and pages_language_overlay. To avoid utilizing a hook for each table, creating preview links can be triggered using Page TSconfig.

# Using page 123 for previewing workspaces records (in general)
options.workspaces.previewPageId = 123

# Using the pid field of each record for previewing (in general)
options.workspaces.previewPageId = field:pid

# Using page 123 for previewing workspaces records (for table tx_myext_table)
options.workspaces.previewPageId.tx_myext_table = 123

# Using the pid field of each record for previewing (or table tx_myext_table)
options.workspaces.previewPageId.tx_myext_table = field:pid

Feature: #59591 - Image quality definable per sourceCollection

Description

The image quality of each sourceCollection entry can be configured. Integrators can already render images with the predefined quality set by LocalConfiguration.php. To decrease the quality of larger images (e.g. double density) in order to lower the file size, integrators can configure the parameter quality of the matching sourceCollection now.

The TypoScript setup can be configured as followed (e.g.):

# for small retina images
tt_content.image.20.1.sourceCollection.smallRetina.quality = 80

# for large retina images
tt_content.image.20.1.sourceCollection.largeRetina.quality = 65

If the new parameter is not set, TYPO3 will use to the default quality of LocalConfiguration.

Impact

The rendering of sourceCollection stays as it is. Users can additionally selectively control the quality of jpeg by TypoScript setup.

Feature: #61799 - Improved handling of online media

Description

Editors can now use YouTube and Vimeo videos (online media) just like a any other file, organising them just like any other file in the file list and selecting them in element browser to use in a CE or any other record. Adding new online media files is done providing the URL to online media. The matching helper class will fetch the needed metadata and supply an image that will be used as preview if available.

YouTube and Vimeo support

The core provides an OnlineMediaHelper and a FileRenderer class for YouTube and Vimeo.

Adding YouTube videos can be done by providing a URL in one of the following formats (with and without http(s)://):

  • youtu.be/<code> # Share URL
  • www.youtube.com/watch?v=<code> # Normal web link
  • www.youtube.com/v/<code>
  • www.youtube-nocookie.com/v/<code> # youtube-nocookie.com web link
  • www.youtube.com/embed/<code> # URL form iframe embed code, can also get code from full iframe snippet

Adding Vimeo videos can be done by providing a URL in one of the following formats (with and without http(s)://):

  • vimeo.com/<code> # Share URL
  • player.vimeo.com/video/<code> # URL form iframe embed code, can also get code from full iframe snippet

Each renderer has some custom configuration options:

YouTubeRenderer

Example of setting the YouTubeRenderer options with the MediaViewHelper:

<!-- enable js api and set no-cookie support for YouTube videos -->
<f:media file="{file}" additionalConfig="{enablejsapi:1, 'no-cookie': true}" />

VimeoRenderer

  • bool autoplay default = FALSE; when set video starts immediately after loading of the page
  • bool loop default = FALSE; if set video starts over again from te beginning when finished
  • bool showinfo default = FALSE; show video title and uploader before video starts playing

Example of setting the YouTubeRenderer options with the MediaViewHelper:

<!-- show title and uploader for YouTube and Vimeo before video starts playing -->
<f:media file="{file}" additionalConfig="{showinfo:1}" />

Register your own online media service

For every service you need an OnlineMediaHelper class that implements OnlineMediaHelperInterface and a FileRenderer class (see #61800) that implements FileRendererInterface. The online media helper is responsible for translating the input given by the editor to a onlineMediaId that is known to the service. The renderer is responsible for turning the onlineMediaId to the correct HTML output to show the media item.

The onlineMediaId is stored in a plain text file that only holds this ID. By giving this file a custom file extension TYPO3 knows which OnlineMediaHelper and FileRenderer belong to it. To further tell TYPO3 what kind of "file" (text, image, audio, video, application, other) this online media holds we also need to bind a custom mime-type to this file extension.

With adding this custom file extension to $GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext'] (see #69543) your custom online media file can be used throughout the backend every where all media files are allowed.

Example of registering your own online media file/service:

// Register your own online video service (the used key is also the bind file extension name)
$GLOBALS['TYPO3_CONF_VARS']['SYS']['OnlineMediaHelpers']['myvideo'] = \MyCompany\Myextension\Helpers\MyVideoHelper::class;

$rendererRegistry = \TYPO3\CMS\Core\Resource\Rendering\RendererRegistry::getInstance();
$rendererRegistry->registerRendererClass(
    \MyCompany\Myextension\Rendering\MyVideoRenderer::class
);

// Register an custom mime-type for your videos
$GLOBALS['TYPO3_CONF_VARS']['SYS']['FileInfo']['fileExtensionToMimeType']['myvideo'] = 'video/myvideo';

// Register your custom file extension as allowed media file
$GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext'] .= ',myvideo';

Override core Helper class with your own helper class

The helper classed provided by the core use the oEmbed web service provided by YouTube and Vimeo to gather some basic metadata for the provided video urls. The upside is that you do not need an API user/key to use their webservice as these services are publicly available. But the downside is that the gathered info is kind of scarce. So if you have an API user/key for these services, you could create an own helper class which provides more meta data.

// Register your own online custom youtube helper class
$GLOBALS['TYPO3_CONF_VARS']['SYS']['OnlineMediaHelpers']['youtube'] = \MyCompany\Myextension\Helpers\YouTubeHelper::class;

Feature: #61993 - _CSS_PAGE_STYLE is now only included on the affected page

Description

CSS set via the TypoScript property _CSS_PAGE_STYLE was concatenated and compressed with the non-page-specific CSS and therefore loaded on pages it did not affect at all.

Impact

The behaviour from now on is that _CSS_PAGE_STYLE is included only on the affected page. Depending on your configuration it will be written in an external file and included on the page or directly added as inline CSS block. Compression for page specific CSS also depends on the global config.compressCss setting.

Feature: #63395 - HTML5 video poster preview image

Description

Enable Video preview image "poster" in media in the old fashion way.

If there is a jpg, jpeg or png image in the same folder with the same name as the video file it will be shown with the HTML5 poster attribute.

The file extensions are checked exactly in the order mentioned above.

Feature: #64535 - IRRE: Suppress and override useCombination warning via TCA settings

Description

When using useCombination=TRUE there is always a FlashMessage warning displayed. It is now possible to override the default warning message with a custom message or to suppress the FlashMessage completely via TCA setting.

Example to suppress useCombination warning message:

$GLOBALS['TCA']['tx_demo_domain_model_demoinline']['columns']['irre_records']['config'] = array(
    'foreign_types_combination' => array(
        '1' => array(
            'showitem' => 'title'
        )
    )
    'appearance' => array(
        'suppressCombinationWarning' => TRUE
        'useCombination' => TRUE
    )
)

Example to override useCombination warning message:

$GLOBALS['TCA']['tx_demo_domain_model_demoinline']['columns']['irre_records']['config'] = array(
    'foreign_types_combination' => array(
        '1' => array(
            'showitem' => 'title'
        )
    )
    'appearance' => array(
        'overwriteCombinationWarningMessage' => 'LLL:EXT:demo/Resources/Private/Language/locallang_db.xlf:tx_demo_domain_model_demoinline.irre_records.useCombinationWarning'
        'useCombination' => TRUE
    )
)

Feature: #64726 - Added support for multiple FlashMessage queues

Description

In Extbase ControllerContext the method getFlashMessageQueue() now optionally allows to specify which queue to fetch. If none is specified the default- messagequeue for the current controller/plugin will be used.

$this->controllerContext->getFlashMessageQueue($queueIdentifier);

In Fluid the flashMessages-ViewHelper also allows to specify a queue to use.

<f:flashMessages queueIdentifier="myQueue" />

Impact

Extensions may now render foreign flash message queues and add messages to them.

Feature: #58621 - Unified Backend Routing

Description

A new Routing component has been added to the TYPO3 Backend which handles addressing different calls / modules inside TYPO3.

A Route is the smallest entity consisting of a path (e.g. "/records/edit/") as well as an identifier for addressing the route, and the information about how to dispatch the route to a PHP controller.

A Route can be a module, wizard or any page inside the TYPO3 Backend. The Router contains the public API for matching paths to fetch a Route and is resolved inside the RequestHandler of the Backend.

The entry point for Routes is typo3/index.php?route=myroute&token=..... The main RequestHandler for all Backend requests detects if a route parameter from the server is given and uses this as the route identifier and then resolves to a controller defined inside the Route.

Routes are defined inside the file "Configuration/Backend/Routes.php" of any extension.

Example of a Configuration/Backend/Routes.php file:

return [
    'myRouteIdentifier' => [
        'path' => '/document/edit',
        'controller' => Acme\MyExtension\Controller\MyExampleController::class . '::methodToCall'
    ]
];

The called method in the controller to be called receives a PSR-7 compliant Request object and a PSR-7 Response object, and has to return a PSR-7 Response object. The UriBuilder generates any kind of URL for the Backend, may it be a module, a typical route or an AJAX call. The UriBuilder returns a PSR-7-conform Uri object that can be casted to string when needed.

Usage:

$uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
$uri = $uriBuilder->buildUriFromRoute('myRouteIdentifier', array('foo' => 'bar'));

See http://wiki.typo3.org/Blueprints/BackendRouting for more details.

Impact

Handling of existing modules works the same as before and fully transparent. Any existing registration of entrypoints can be moved to the new registration file in Configuration/Backend/Routes.php.

Feature: #65791 - Use PHP configured sendmail path, if [MAIL][transport] = sendmail is active

Description

The install tool setting [MAIL][transport_sendmail_command] is now retrieved automatically from PHP runtime configuration sendmail_path during installation (instead of '/usr/sbin/sendmail -bs').

Impact

There are no impacts on current installations.

New installations will have [MAIL][transport_sendmail_command] automatically set during installation using sendmail_path from PHP runtime configuration. It can still be changed manually.

As this setting is only used if [MAIL][transport] is set to sendmail, it doesn't have impact on other transport schemes.

Feature: #66366 - Introduced MediaViewHelper

Description

In order to comfortably render video, audio and all other file types with a registered Renderer class (RenderingRegistry introduced with #61800) in FE, the MediaViewHelper has been added.

The MediaViewHelper first checks if there is a Renderer present for the given file. If not, it will as fallback render a image tag. This way it is a replacement for the ImageViewHelper in most cases when rendering video and audio tags.

Examples:

<code title="Image Object">
    <f:media file="{file}" width="400" height="375" />
</code>
<output>
    <img alt="alt set in image record" src="fileadmin/_processed_/323223424.png" width="396" height="375" />
</output>

<code title="MP4 Video Object">
    <f:media file="{file}" width="400" height="375" />
</code>
<output>
    <video width="400" height="375" controls><source src="fileadmin/user_upload/my-video.mp4" type="video/mp4"></video>
</output>

<code title="MP4 Video Object with loop and autoplay option set">
    <f:media file="{file}" width="400" height="375" additionalConfig="{loop: '1', autoplay: '1'}" />
</code>
<output>
    <video width="400" height="375" controls loop><source src="fileadmin/user_upload/my-video.mp4" type="video/mp4"></video>
</output>

Feature: #66371 - Introduce autoplay option for video and audio files

Description

The RenderingRegistry added with #61800 introduced the option to render video and audio tags with the new MediaViewHelper added with #66366. To improve the usability of this feature an autoplay checkbox has been added to the sys_file_reference records to enable the editor to configure this option on a per file basis.

To make the autoplay option available in sys_file_reference records, make use of the new palettes videoOverlayPalette and audioOverlayPalette in your TCA.

However, the autoplay property of the sys_file_reference is only taken into account if the view helper does not explicitly specify an autoplay option.

Examples:

Example config of an sys_file_reference field in TCA:

'media' => array(
    'exclude' => 1,
    'label' => 'Media',
    'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
        'media',
        array(
            'foreign_types' => array(
                \TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => array(
                    'showitem' => '
                        --palette--;;audioOverlayPalette,
                        --palette--;;filePalette',
                ),
                \TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => array(
                    'showitem' => '
                        --palette--;;videoOverlayPalette,
                        --palette--;;filePalette',
                )
            )
        ),
        'wav,mpeg,mp4,ogg'
    )
)
<code title="MP4 Video Object with autoplay option set regardless of sys_file_reference checkbox">
    <f:media file="{file}" width="400" height="375" additionalConfig="{autoplay: '1'}" />
</code>
<output>
    <video width="400" height="375" controls autoplay><source src="fileadmin/user_upload/my-video.mp4" type="video/mp4"></video>
</output>

 <code title="MP4 Video Object without autoplay option set will respect the configuration of the sys_file_reference record">
    <f:media file="{file}" width="400" height="375" />
</code>
<output>
    <video width="400" height="375" controls><source src="fileadmin/user_upload/my-video.mp4" type="video/mp4"></video>
</output>

Feature: #67056 - Add option to disable move buttons TCA group type

Description

The move buttons of the TCA type group can now be explicitly disabled with the hideMoveIcons option. Before these icons where only automatically removed if maxitems was set to 1.

'options' => array(
    'label' => 'Options',
    'config' => array(
        'type' => 'group',
        'internal_type' => 'db',
        'allowed' => 'pages',
        'maxitems' => 9999,
        'hideMoveIcons' => TRUE,
    ),
),

Impact

Move buttons can now always be hidden for group fields

Feature: #67875 - Override CategoryRegistry entries

Description

The makeCategorizable method of the \TYPO3\CMS\Core\Utility\ExtensionManagementUtility class has been extended with a new parameter override to set a new category configuration for an already registered table / field combination.

If the parameter is set to TRUE, previously defined registry entries are cleared for the current table / field combination before adding the new configuration.

The intended usecase for this method is to add additional TCA types for a previously registered table.

A good example is the tt_content table:

  1. The basic TCA is defined in the frontend Extension.
  2. After the processing of the normal TCA definition, the default categorized tables (from the install tool setting SYS/defaultCategorizedTables) are initialized and the categories tab is added to the showitem configuration for all TCA types that exist so far.
  3. Now the TCA overrides are processed. The css_styled_content Extension defines additional TCA types. After the types are defined the addOrOverride() method is called to add the category tab to them.

Impact

The current behavior of the existing functionality is not changed. Only new functionality is added.

Example

// This example is from the tt_content TCA overrides file from the css_styled_content Extension.
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable('css_styled_content', 'tt_content', 'categories', array(), TRUE);

Feature: #67880 - Added count to split

Description

A new property returnCount is added to the stdWrap property split.

When dealing with comma separated values like the content of field:records or similar, we might need to know how many items are present inside the csv.

Example:

# should return 9
1 = TEXT
1 {
    value = x,y,z,1,2,3,a,b,c
    split.token = ,
    split.returnCount = 1
}

Feature: #67932 - RenderType for rsa encrypted input fields

Description

EXT:rsaauth defines an own render type for TCA input fields. Those fields will be encrypted before submitting the form.

Impact

In the Backend password fields for backend and frontend users are automatically encoded before the form is submitted.

Usage

To encrypt your own TCA fields you can add define the render type rsaInput.


$GLOBALS['TCA']['be_users']['columns']['password']['config']['renderType'] = 'rsaInput';

Feature: #68429 - Introduced AvatarProvider API

Description

To make providing an avatar image for BE users more flexible an API has been introduced so you can register AvatarProviders. The core provides the DefaultAvatarProvider by default to handle the image defined in the user settings.

When an avatar is rendered in the BE the available AvatarProviders are asked if they can provide an TYPO3\CMS\Backend\Backend\Avatar\Image for the given be_users record in the requested size. The first TYPO3\CMS\Backend\Backend\Avatar\Image that gets returned is used.

Registering an avatar provider

An avatar provider can be registered within your ext_localconf.php file like this:

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['backend']['avatarProviders']['myCustomProvider'] = [
    'provider' => \MyVendor\MyExtension\AvatarProvider\CompanyAvatarProvider::class,
    'before' => ['defaultAvatarProvider']
];

The settings are defined as:

  • provider: The avatar provider class name, which must implement TYPO3\CMS\Backend\Backend\Avatar\AvatarProviderInterface.
  • before/after: You can define the ordering how providers are executed. This is used to get the order in which the providers are executed.

For a new avatar provider you have to register a new key in $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['backend']['avatarProviders']. If your avatar provider extends another one, you may only overwrite necessary settings. An example would be to extend an existing provider and replace its registered 'provider' class with your new class name.

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['backend']['avatarProviders']['defaultAvatarProvider']['provider'] = \MyVendor\MyExtension\AvatarProvider\CustomAvatarProvider::class;

AvatarProviderInterface

The AvatarProviderInterface contains only one method:

public function getImage(array $backendUser, $size);

The parameters are defined as:

  • $backendUser: The record from be_users database table.
  • $size: The requested size of the avatar image.

The return value of the method is expected to be an instance of TYPO3\CMS\Backend\Backend\Avatar\Image or NULL when the provider can not provide an image.

An TYPO3\CMS\Backend\Backend\Image object has 3 properties:

  • $url: Url of avatar image. Needs to be relative to the website root or an absolute URL.
  • $width: The width of the image.
  • $height: The height of the image.

Feature: #68700 - Autoload definition can be provided in ext_emconf.php

Description

It is now possible for extensions to provide one or more PSR-4 definitions, in the ext_emconf.php file.

While it was possible to define a psr-4 section in a composer.json before already, now it is also possible to define an autoload/psr-4 section in the ext_emconf.php file as well, so that extension authors do not need to provide a composer.json just for that any more.

This is the new recommended way to register classes for TYPO3.

Example ext_emconf.php:

<?php
$EM_CONF[$_EXTKEY] = array (
  'title' => 'Extension skeleton for TYPO3 7',
  'description' => 'Description for ext',
  'category' => 'Example Extensions',
  'author' => 'Helmut Hummel',
  'author_email' => 'info@helhum.io',
  'author_company' => 'helhum.io',
  'shy' => '',
  'priority' => '',
  'module' => '',
  'state' => 'stable',
  'internal' => '',
  'uploadfolder' => '0',
  'createDirs' => '',
  'modify_tables' => '',
  'clearCacheOnLoad' => 0,
  'lockType' => '',
  'version' => '0.0.1',
  'constraints' =>
  array (
    'depends' =>
    array (
      'typo3' => '7.5.0-7.99.99',
    ),
    'conflicts' =>
    array (
    ),
    'suggests' =>
    array (
    ),
  ),
  'autoload' =>
  array(
    'psr-4' =>
    array(
      'Helhum\\ExtScaffold\\' => 'Classes'
    )
  )
);

Impact

Without providing an autoload section, TYPO3 scans the complete extension directory for PHP class files and registers them all. This includes test classes or classes of third party libraries, which might lead to unexpected results.

Therefore it is recommended to provide such an autoload section in an extension. It will be ignored in older TYPO3 versions, so there will be no issue with backwards compatibility.

Feature: #68724 - EM: "Get preconfigured distribution" shows only distributions that suite the current TYPO3 version

Description

As the list of distributions gets longer, it is filtered now to those distributions that suite the current TYPO3 version.

Impact

Distributions that require different TYPO3 versions are not shown anymore.

Feature: #68741 - Introduce new IconFactory as base to replace the icon skinning API

Description

The logic for working with icons, icon sizes and icon overlays is now bundled into the new IconFactory class. The new icon factory will replace the old icon skinning API step by step.

All core icons will be registered directly in the IconRegistry class, third party extensions must use IconRegistry::registerIcon() to override existing icons or add additional icons to the icon factory.

The IconFactory takes care of the correct icon and overlay size and the markup.

IconProvider

The core implements three icon provider classes, which all implement the IconProviderInterface.

  • BitmapIconProvider for all kind of bitmap icons for gif, png and jpg files
  • FontawesomeIconProvider for font icons from fontawesome.io
  • SvgIconProvider for svg icons

Third party extensions can provide own icon provider classes, each class must implement the IconProviderInterface.

BitmapIconProvider

The BitmapIconProvider has the following option

  • source The path to the bitmap file, this may also contain the EXT: prefix

FontawesomeIconProvider

The FontawesomeIconProvider has the following option

  • name The name of the icon without the icon prefix e.g. check instead of fa-check

SvgIconProvider

The SvgIconProvider has the following option

  • source The path to the svg file, this may also contains the EXT: prefix

Register an icon

/*
 * Put the following code into your ext_localconf.php file of your extension.
 *
 * @param string $identifier the icon identifier
 * @param string $iconProviderClassName the icon provider class name
 * @param array $options provider specific options, please reference the icon provider class
 */
IconRegistry::registerIcon($identifier, $iconProviderClassName, array $options = array());

Use an icon

To use an icon, you need at least the icon identifier. The default size is currently 32x32 px. The third parameter can be used to add an additional icon as overlay, which can be any registered icon.

The Icon class provides only the following constants for Icon sizes:

  • Icon::SIZE_SMALL which currently means 16x16 px
  • Icon::SIZE_DEFAULT which currently means 32x32 px
  • Icon::SIZE_LARGE which currently means 48x48 px

All the sizes can change in future, so please make use of the constants for an unified layout.

$iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$iconFactory->getIcon($identifier, Icon::SIZE_SMALL, $overlay)->render();

ViewHelper

The core provides a fluid ViewHelper which makes it really easy to use icons within a fluid view.

{namespace core = TYPO3\CMS\Core\ViewHelpers}
<core:icon identifier="my-icon-identifier" />
<!-- use the "small" size if none given ->
<core:icon identifier="my-icon-identifier" />
<core:icon identifier="my-icon-identifier" size="large" />
<core:icon identifier="my-icon-identifier" overlay="overlay-identifier" />
<core:icon identifier="my-icon-identifier" size="default" overlay="overlay-identifier" />
<core:icon identifier="my-icon-identifier" size="large" overlay="overlay-identifier" />

Impact

No impact

Feature: #68746 - Add annotation for CLI only commands

Description

The PHPDoc annotation @cli was added to indicate Extbase CommandController commands to be usable on CLI only. In general each defined CommandController can be selected within the Extbase CommandController Task in the scheduler. For some commands like extbase:help:help running in a scheduler task is not wanted or needed. Now those commands can be excluded from the scheduler command selection.

Impact

Extbase CommandController commands annotated with @cli are not shown as command in the scheduler task.

Feature: #68756 - Add config "base" to stdWrap

Description

The following function was updated and added with a new optional parameter $base: TYPO3\CMS\Core\Utility\GeneralUtility::formatSize($sizeInBytes, $labels = , $base = 0)

This affects the function: TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->stdWrap_bytes

Until now it was not possible to set the base parameter via TypoScript if you add custom labels.

Impact

The ability to set the base (1000 or 1024) via TypoScript configuration has been added.

With the base property it can be defined whether to use a base of 1000 or 1024 to calculate with

Thus
:
bytes.labels = " | K| M| G" bytes.base = 1000

Feature: #68757 - Provide untouched newPassword in felogin password_changed hook

Description

The new parameter newPasswordUnencrypted in the EXT:felogin password_changed hook won't be salted if EXT:saltedpaswords is enabled. It is now possible to work with the real new password.

Feature: #68773 - Show a special image for official distributions in Extension Manager

Description

For official distributions a special image is displayed in the "Get preconfigured distribution" list. So it is easier now to distinguish the official distributions from others.

Feature: #68804 - Colored output for CLI-relevant error messages

Description

Calling typo3/cli_dispatch.phpsh via the command line will now show a colored error message when an invalid or no CLI key as first parameter is given.

Feature: #68837 - Closures for Command Line Scripts

Description

For registering new command line scripts through the CLI API ("cliKey"), it is now possible to use PHP closures instead of reference to PHP scripts.

Example usage inside ext_localconf.php:

$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys']['myclikey'] = array(
    function() {
        $controller = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\Acme\MyExtension\CommandLineTool::class);
        $controller->main();
    },
    '_CLI_lowlevel'
);

Feature: #69095 - Introduce icon state for IconFactory

Description

A state (default or disabled) for icons has been added. The state "disabled" marks an icon as disabled and shows the icon with 50% opacity.

Use an icon

The method IconFactory::getIcon() has now a fourth parameter for the state.

The \TYPO3\CMS\Core\Type\Icon\IconState class provides only the following constants for icon states:

  • State::STATE_DEFAULT which currently means 100% opacity
  • State::STATE_DISABLED which currently means 50% opacity

The states may change in future, so please make use of the constants for an unified layout.

$iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$iconFactory->getIcon($identifier, Icon::SIZE_SMALL, $overlay, IconState::cast(IconState::STATE_DEFAULT))->render();

ViewHelper

The core provides a Fluid ViewHelper which makes it really easy to use icons within a Fluid view. This ViewHelper has an argument for the new state parameter.

{namespace core = TYPO3\CMS\Core\ViewHelpers}
<core:icon identifier="my-icon-identifier" state="disabled" />

Feature: #69119 - Add a basic search to the filelist module

Description

A basic recursive file search by file name has been added to be able to search for files in the file list module like it was possible with EXT:dam.

The search happens recursively from the currently chosen folder in the folder tree. This way it is possible to search whole mount points or just single folders with a lot of files.

The search results will be displayed similar to the regular file list although some features of the regular list view are missing. There is no possibility to order the search results yet. Also the buttons for localization and clipboard commands are missing in this first implementation. Regular file command links like editing, renaming and deleting are already implemented. By default the search results are ordered by the file identifier, i.e. the file path ascending from A-Z.

Feature: #69389 - Add spinning feature for icon

Description

The Icon API has now a support for spinning icons. While registering an icon a new property spinning is available:

$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
$iconRegistry->registerIcon(
    'my-spinning-icon',
    \TYPO3\CMS\Core\Imaging\IconProvider\FontawesomeIconProvider::class,
    array(
        'name' => 'times',
        'spinning' => TRUE
    )
);

Impact

Icons can now be animated.

Feature: #69401 - Adopt form to support the Extbase/ Fluid MVC stack

Description

Short summery

The form extension - including the custom data model, controller logic, property validation, views and templating - has been adopted to support the Extbase/ Fluid MVC stack. This allows better customization and control of the generated behavior and markup by simply modifying Fluid templates or utilizing own custom view helper logic. At the same time the rewrite must not break current setups, i.e. the frontend rendering must be as compatible as possible.

Details

Fluid Rendering

The rendering of the frontend output is based on Fluid. Form relies on the native Fluid viewhelpers of the core and ships 2 new viewhelpers for optimal rendering of the SELECT object including the support of OPTGROUP objects. Furthermore a viewhelper is included to optimize the output of text mails.

To support existing setups a compatibility mode is introduced. The mode is activated by default. This has no impact on the rendering as long as no "old" TypoScript settings (like .layout =) are present. If old rendering settings are used a compatibility theme is loaded which guarantees maximum backwards compatibility including all the different wrap-abilities like containerWrap and elementWrap.

For new installations it is recommended to switch off the compatibility mode and use own Fluid templates to customize the output.

For each form object and view a Fluid partial is available. There are 3 views: the form itself (show), the confirmation page (confirmation) and the email (postProcessor/ mail). The patch allows to customize the frontend output for every single view, e.g. one can have a custom Fluid partial for the BUTTON object of the confirmation view.

The partialRootPath can be overridden or extended to customize the form objects on a global scope. Furthermore it is possible to set a partial path for each form element on a local scope.

10 = BUTTON
10 {
    label = My button
    name = myButton
    partialPath = FlatElements/MyButton
}

The Fluid rendering would look for a MyButton.html located in the defined partialRootPath.

In addition it is now possible to decide if an element should be rendered for a specific view. The visualisation can be adopted by using the TypoScript settings visibleInShowAction, visibleInConfirmationAction and visibleInMail. As an example, this is utilized to hide the FIELDSET object on the confirmation page which was the default behaviour in earlier versions of form.

Extensibility

It is now possible to register custom form objects and attributes easily only by using TypoScript and Fluid. Form attributes can now be cObjects and use stdWrap. This is only possible if the form was not designed within the form wizard.

Furthermore 2 new signal slots are implemented to allow the manipulation of the form objects and the submitted data.

Validation

The validators are now using the extbase property mapping validation process.

Additional information

The session handling was dropped since it was unstable (see #58765). Now form relies on the concepts of Extbase.

The unit tests have been adopted to reflect the code changes.

Future

Further patches are needed to adopt the form wizard. The wizard still works as it used to after applying this patch but it is not able to reflect the new features like choosing a partial path for a single element.

Another patch will take care of the documentation.

A few more patches will come which will fix some issues regarding the validators and filters.

Feature: #69409 - Allow value attribute for OPTION object in wizard

Description

Now it is possible to add a value to the OPTION object using the wizard. Furthermore the table within the field options of the SELECT configuration has been improved. There were no labels shown which has been fixed now.

Feature: #69416 - Plugins (AbstractPlugin) can load custom language file

Description

AbstractPlugin::pi_loadLL takes an optional argument specifying path to a language file. It allows placing language files in other paths like in Extbase structure "Resources/Private/Language". Previously language file had to be located in the directory set in the scriptRelPath property.

Impact

Possibility to put language label files in other paths.

Feature: #69459 - Show tt_content preview in page module via Fluid

Description

A new PageTSconfig option allows to render a preview of a single content element in the Backend via Fluid.

The following option allows to override the default output of a content element via PageTSconfig:

mod.web_layout.tt_content.preview.media = EXT:site_mysite/Resources/Private/Templates/Preview/Media.html

All content elements with CType "media" will then be rendered by the Fluid Template which can be rendered like:

<h4>{header}</h4>
<f:format.crop length="200">{bodytext}</f:format.crop>

All properties of the tt_content record are available in the template directly. Any data of the flexform field pi_flexform is available with the property pi_flexform_transformed as an array.

note

If a PHP hook already is set to render the element, it will take precedence over the Fluid-based preview.

Feature: #69496 - Extract title from PDF when indexing

Description

Indexed search is now able to natively extract the title when indexing PDF documents.

Impact

The title of indexed PDF documents is now extracted.

Feature: #69512 - Support *.typoscript files as text file type

Description

The file type typoscript has been added to the list of text file types.

Impact

Files with the type typoscript can now be edited through the file list module.

Feature: #69543 - Introduced $GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext']

Description

Now we got the RendererRegistry with the VideoTagRenderer, AudioTagRenderer and MediaViewHelper in the core we needed also a way to define a list of file extensions of the files that can be handled by these. This list can then be used in the TCA for allowing sys_file_references to these files.

// Comma list of file extensions perceived as media files by TYPO3.
// Lowercase and no spaces between
$GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext'] = 'gif,jpg,jpeg,bmp,png,pdf,svg,ai,mov,avi';

TCA example:

'media' => array(
    'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.media',
    'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig('media', array(
        'foreign_types' => array(
            '0' => array(
                'showitem' => '
                    --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
                    --palette--;;filePalette'
            ),
            \TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => array(
                'showitem' => '
                    --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
                    --palette--;;filePalette'
            ),
            \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => array(
                'showitem' => '
                    --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
                    --palette--;;filePalette'
            ),
            \TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => array(
                'showitem' => '
                    --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
                    --palette--;;filePalette'
            ),
            \TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => array(
                'showitem' => '
                    --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
                    --palette--;;filePalette'
            ),
            \TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => array(
                'showitem' => '
                    --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
                    --palette--;;filePalette'
            )
        )
    ), $GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext'])
),

Extending this list:

If you want to extend this list you can add the desired extension name to list in the ext_localconf.php of your extension.

$GLOBALS['TYPO3_CONF_VARS']['SYS']['mediafile_ext'] .= ',myext';

Feature: #69568 - FormEngine data processing

Description

Warning: The FormEngine data structure will change in the future and extensions must not rely on array or class structures at the moment.

The FormEngine construct to render records has been split to two main parts where the first data processing part takes care of gathering and processing all data needed for the second part to render final form data.

The data processing is done via FormDataCompiler that returns a data array that can be given to the outer most render container. The array contains all main data required by the render part like final TCA as well as the processed database row.

Extensions can change the data processing by registering additional items in the data processing chain. For casual TCA based database records, the FormDataGroup TcaDatabaseRecord is used to define relevant data provider within $GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['formDataGroup']['tcaDatabaseRecord']. Additional data provider can be added at specific positions using the depends and before keywords relative to other providers.

Feature: #69602 - Simplify handling of backend layouts in frontend

Description

To avoid complex TypoScript for integrators, the handling of backend layouts has been simplified for the frontend.

To get the correct backend layout, the following TypoScript code can be used:

page.10 = FLUIDTEMPLATE
page.10 {
  file.stdWrap.cObject = CASE
  file.stdWrap.cObject {
    key.data = pagelayout

    default = TEXT
    default.value = EXT:sitepackage/Resources/Private/Templates/Home.html

    3 = TEXT
    3.value = EXT:sitepackage/Resources/Private/Templates/1-col.html

    4 = TEXT
    4.value = EXT:sitepackage/Resources/Private/Templates/2-col.html
  }
}

Using data = pagelayout is the same as using as

field = backend_layout
ifEmpty.data = levelfield:-2,backend_layout_next_level,slide
ifEmpty.ifEmpty = default

Feature: #69730 - Introduce uniqueId generator

Description

A new method getUniqueId() has been added to the StringUtility class. Now there is a common way to generate an unique identifier which can be used even in HTML tag attributes as it removes the invalid dot character.

$uniqueId = \TYPO3\CMS\Core\Utility\StringUtility::getUniqueId('Prefix');

Impact

No need to remove the dot manually anymore.

Feature: #69855 - Dispatcher for Backend Routing added

Description

The previously introduced Backend Routing is updated so that Routes must be defined with a class name and method name, or a Closure / callable. The controller/action or closure is now named as "target".

Example from EXT:backend/Configuration/Backend/Routes.php

// Logout script for the TYPO3 Backend
'logout' => [
    'path' => '/logout',
    'target' => Controller\LogoutController::class . '::logoutAction'
]

Impact

Each method that is registered will receive both the Request object and the Response object which can be manipulated for output.

The fixed ControllerInterface is not needed anymore and will be removed.

Feature: #69918 - Add PSR-7-based dispatching for Backend Modules

Description

Built on the PSR-7 principle and the routing concepts, it is now possible to register backend modules which are dispatched to a callable string instead of pointing to an index.php file in EXT:myextension/Modules/MyModule/index.php.

The method which is called, receives a PSR-compatible request and response object and must return a response object which is outputted to the browser.

An example registration uses the option routeTarget to resolve the method to be called when rendering the module:

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule(
    'web',
    'layout',
    'top',
    '',
    array(
        'routeTarget' => \TYPO3\CMS\Backend\Controller\PageLayoutController::class . '::mainAction',
        'access' => 'user,group',
        'name' => 'web_layout',
        'labels' => array(
            'tabs_images' => array(
                'tab' => 'EXT:backend/Resources/Public/Icons/module-page.svg',
            ),
            'll_ref' => 'LLL:EXT:backend/Resources/Private/Language/locallang_mod.xlf',
        ),
    )
);

Feature: #70002 - Make it possible to register own icons for file extensions

Description

The IconRegistry has been extended with a mapping of file extensions.

Impact

It is now possible to register or overwrite the iconIdentifier for a file extension.

$iconRegistry = GeneralUtility::makeInstance(IconRegistry::class);
$iconRegistry->registerFileExtension('log', 'icon-identiifer-for-log-files');

Feature: #70078 - Extensions can provide a class map for class loading

Description

With the old class loader it was possible for extension authors to register several classes in an ext_autoload.php file.

This possibility was completely removed with introduction of composer class loading. In composer mode, one can fully benefit from composer and its class loading options. However TYPO3 installations in non composer mode (extracted and symlinked archive of sources), lack this functionality completely.

Now it is possible to provide a class map section in either the composer.json file or the ext_emconf.php file. This section will be evaluated and used also in non composer mode.

Example ext_emconf.php file:

<?php
$EM_CONF[$_EXTKEY] = array (
  'title' => 'Extension skeleton for TYPO3 7',
  'description' => 'Description for ext',
  'category' => 'Example Extensions',
  'author' => 'Helmut Hummel',
  'author_email' => 'info@helhum.io',
  'author_company' => 'helhum.io',
  'shy' => '',
  'priority' => '',
  'module' => '',
  'state' => 'stable',
  'internal' => '',
  'uploadfolder' => '0',
  'createDirs' => '',
  'modify_tables' => '',
  'clearCacheOnLoad' => 0,
  'lockType' => '',
  'version' => '0.0.1',
  'constraints' =>
  array (
    'depends' =>
    array (
      'typo3' => '7.5.0-7.99.99',
    ),
    'conflicts' =>
    array (
    ),
    'suggests' =>
    array (
    ),
  ),
  'autoload' =>
  array(
    'psr-4' =>
    array(
      'Helhum\\ExtScaffold\\' => 'Classes'
    ),
    'classmap' =>
    array(
      'Resources/PHP/Libs'
    )
  )
);

In the example configuration the path Resources/PHP/Libs is parsed for PHP files which are automatically added to the class loader.

Impact

Extensions that target TYPO3 6.2 LTS and 7 LTS can now provide a class map in ext_emconf.php which is only evaluated in TYPO3 7 LTS and an ext_autoload.php which is only evaluated in 6.2 LTS for maximum flexibility and compatibility.

Feature: #7098 - Severity-filtering for FlashMessageQueue

Description

So far only all messages of the FlashMessageQueue could be fetched and/or removed. With this addition it's possible to do that for a given severity only. The existing functions get an optional $severity-parameter.

Usage:

FlashMessageQueue::getAllMessages($severity);
FlashMessageQueue::getAllMessagesAndFlush($severity);
FlashMessageQueue::removeAllFlashMessagesFromSession($severity);
FlashMessageQueue::clear($severity);