Posted by & filed under TYPO3.

Function t3lib_div::trimExplode now has a fourth parameter, allowing to limit the number of results. If positive, the result will contain a maximum of limit elements, if negative, all components except the last -limit are returned, if zero (default), the result is not limited at all.

More info:
RFC: Feature Request #9656: Extend t3lib_div::trimExplode to limit the number of elements
http://bugs.typo3.org/view.php?id=9656

Posted by & filed under TYPO3.

In TCA, under [‘columns’][fieldname][‘config’][‘appearance’] there is a new array with the key enabledControls. Each element of the array can be set to a Boolean, indicating if it should be shown on the record. Example:


'config' => array(
 'type' => 'inline',
 ...
 'appearance' => array(
  'enabledControls' => array(
   'new' => false,
   'hide' => true,
   'info' => false,
   'new' => true,
   'dragdrop' => false,
   'sort' => true,
   'hide' => false,
   'delete' => true,
   'localize' => false,
  ),
 ),
),

More info:
RFC: Feature Request #8523: IRRE – Integrate possibility to define enabledControls in TCA
http://bugs.typo3.org/view.php?id=8523

Posted by & filed under TYPO3.

New function t3lib_extMgm::addFieldsToAllPalettesOfField()  allows to add fields to palettes of an existing field. It can be called like:
/**
* Adds new fields to all palettes of an existing field.
* If the field does not have a palette yet, it's created automatically and
* gets called "generatedFor-$field".
*
* @param string $table: Name of the table
* @param string $field: Name of the field that has the palette to be extended
* @param string $addFields: List of fields to be added to the palette
* @param string $insertionPosition: Insert fields before (default) or after one
* of this fields (commalist with "before:" or "after:" commands).
* Example: "before:keywords,--palette--;;4,after:description".
* Palettes must be passed like in the example no matter how the
* palette definition looks like in TCA.
*/

t3lib_extMgm::addNewFieldsToAllPalettesOfField($table, $field, $addFields, $insertionPosition);

More info:
RFC: Feature Request #9625: Integrate possibility to extend TCEforms palettes easily
http://bugs.typo3.org/view.php?id=9625

Posted by & filed under TYPO3.

Singletons can now be instantiated with t3lib_div::makeInstance, if they implement interface t3lib_singleton.

Singletons are classes that exist as one instance during execution. No matter how many times the class is instantiated, the same instance will be returned. This saves precious memory during execution.

More info:
RFC #9520: add a scheme to support singletons with t3lib_div::makeInstance