Snippets für den Umstieg LTS 9 auf LTS 10
Annotation: @validate / @ignoreValidation
Mit LTS 10 hat sich die Syntax für @ignoreValidation im Controller bzw. @validate in einem Modell geändert.
SIehe auch die aktuelle Doku
Im Controller:
* @ignorevalidation $newSpiel
nun anstatt eines Variablen Namens, den Namen des zu ignorierenden Objects als String
* @TYPO3\CMS\Extbase\Annotation\IgnoreValidation("newSpiel")
Beispiel:
/**
* action new
*
* @param Spiel $newSpiel
* @TYPO3\CMS\Extbase\Annotation\IgnoreValidation("newSpiel")
* @return void
*/
public function newAction(Spiel $newSpiel = NULL) {
Und um in der dazugehörenden Create Action
* @validate $newSpiel \JVE\JvBrettspiele\Validation\Validator\NewSpielValidator
nun im Head der Klasse und
use TYPO3\CMS\Extbase\Annotation as Extbase;
* @Extbase\Validate(param="newSpiel", validator="JVE\JvBrettspiel\Domain\Validator\NewSpielValidator")
Beispiel:
/**
* action create
*
* @param Spiel $newSpiel
* @Extbase\Validate(param="newSpiel" , validator="JVE\JvBrettspiel\Domain\Validator\NewSpielValidator")
* @return void
*/
public function createAction(Spiel $newSpiel = NULL) {
Im dazu passenden Datenmodel, z.b. den Namen auf "Nicht Leer" zu überprüfen nun anstatt, wie vom Extension Builder "annodazumal" erzeugt:
* @validate "NotEmpty"
nun
* @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty")
Beispiel:
/**
* name
*
* @var \string
* @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty")
*/
protected $name;
FAL - Image: Use IRRE relations in own flexform content element
Nach dem Umstieg von LTS 9 auf LTS 10 , fehlte mir die Möglichkeit, in meinem "selbstgebauten" Content element Image Slider im backend neue BIlder hinzuzufügen.
Im Config Abschnitt fehlten mit einige Punkte
<settings.images type="array">
<TCEforms type="array">
<exclude>1</exclude>
<label>LLL:EXT:jve_template/Resources/Private/Language/locallang_db.xlf:flexform.slider.sheet.images.title</label>
<config>
<type>inline</type>
<maxitems>99</maxitems>
<foreign_table>sys_file_reference</foreign_table>
<!--<foreign_field>uid_foreign</foreign_field>-->
<foreign_table_field>tablenames</foreign_table_field>
<foreign_label>uid_local</foreign_label>
<foreign_sortby>sorting_foreign</foreign_sortby>
<foreign_selector>uid_local</foreign_selector>
<foreign_selector_fieldTcaOverride type="array">
<config>
<appearance>
<elementBrowserType>file</elementBrowserType>
<elementBrowserAllowed>jpg,png,jpeg</elementBrowserAllowed>
</appearance>
</config>
</foreign_selector_fieldTcaOverride>
<foreign_types type="array">
<numIndex index="2" type="array">
<showitem>--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,--palette--;;filePalette</showitem>
</numIndex>
</foreign_types>
<foreign_match_fields type="array">
<fieldname>image</fieldname>
</foreign_match_fields>
<appearance type="array">
<newRecordLinkAddTitle>1</newRecordLinkAddTitle>
<useSortable>1</useSortable>
<headerThumbnail>
<field>uid_local</field>
<height>64</height>
<width>64</width>
</headerThumbnail>
<enabledControls>
<info>1</info>
<new>1</new>
<dragdrop>1</dragdrop>
<sort>1</sort>
<hide>1</hide>
<delete>1</delete>
<localize>0</localize>
</enabledControls>
<createNewRelationLinkTitle>LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference</createNewRelationLinkTitle>
</appearance>
<overrideChildTca>
<columns type="array">
<uid_local type="array">
<config type="array">
<appearance type="array">
<elementBrowserType>file</elementBrowserType>
<elementBrowserAllowed>jpg,png,jpeg</elementBrowserAllowed>
</appearance>
</config>
</uid_local>
</columns>
<types type="array">
<numIndex index="2">
<showitem>--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,--palette--;;filePalette</showitem>
</numIndex>
</types>
</overrideChildTca>
</config>
</TCEforms>
</settings.images>
TYPOSCRIPT Import syntax hat sich geändert
Auch wenn das kein "Breaking Change" war, da derzeit die alte Variante noch funktioniert, aber da bei mir der Import im Packend als Page TS in dem alten Format ohenhin nicht geklappt, hat, hab ich das geändert von:
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:jve_template....">
zu:
@import "typo3conf/ext/jve_template/Configuration/TypoScript/www.jve.com/TSConfig/Rte/RTE-ckeditor.typoscript"