6.2 Built-in ViewHelpers

Beschreibung

TYPO3 CD 2020 (zweite Auflage) Quiz am 6.2 Built-in ViewHelpers, erstellt von Pascal Bartl am 09/04/2021.
Pascal Bartl
Quiz von Pascal Bartl, aktualisiert more than 1 year ago
Pascal Bartl
Erstellt von Pascal Bartl vor mehr als 3 Jahre
1
0

Zusammenfassung der Ressource

Frage 1

Frage
Which built-in ViewHelpers exist in the Fluid extension shipped with the TYPO3 core? (2)
Antworten
  • The AntiCrossSiteScripting-ViewHelper (to protect the content against cross-site scripting attacks).
  • The Translate-ViewHelper (to retrieve a label from a language file)
  • The Average-ViewHelper (to calculate the average across values of an array)
  • The DebugViewHelper (to generate a HTML dump of the passed variable)
  • The Style-ViewHelper (to apply CSS styles to a string)
  • The ObfuscateEmail-ViewHelper (to obfuscate an email address)

Frage 2

Frage
What is the output of the following Fluid template? (1) <f:for each="{0: 'A', 1: 'B', 2: 'C', 3: 'D'}" as="v" iteration="i"> <f:if condition="{i.isEven}"> {i.cycle} </f:if> {v} </f:for>
Antworten
  • A 2 B C 4 D
  • A 1 B C 3 D
  • 1 A B 3 C D
  • 2 A B 4 C D
  • A C

Frage 3

Frage
What is the output of the following Fluid template? (1) <f:for each="{0:1, 1:2, 2:3, 3:4, 4:5}" as="foo"> <f:cycle values="{0: 'foo', 1: 'bar', 2: 'baz'}" as="cycle"> {cycle} </f:cycle> </f:for>
Antworten
  • foobarbaz
  • foofoobarbarbaz
  • 0barbaz34
  • foobarbazfoobar
  • 01234

Frage 4

Frage
What is the output of the following Fluid template? (1) <f:groupedFor each="{0: {name: 'A', tag: 'g'}, 1: {name: 'B', tag: 'r'}, 2: {name: '\ C', tag: 'y'}, 3: {name: 'D', tag: 'r'}}" as="foo" groupBy="tag" groupKey="tag"> {tag} (<f:for each="{foo}" as="bar" key="label">{bar.name}</f:for>) </f:groupedFor>
Antworten
  • A (g) BD (r) C (y)
  • g (A) r (BD) y (C)
  • A () BD () C ()
  • (Ag) (BDr) (Cy)
  • (gA) (rBD) (yC)

Frage 5

Frage
How can comments be implemented in Fluid so that the content does not appear in the HTML source code? (2)
Antworten
  • <comment>content</comment>
  • {comment}content{/comment}
  • {content -> f:comment()}
  • <!-- content -->
  • <f:comment>content</f:comment>

Frage 6

Frage
How can an image be scaled down to a width of 100px by the TYPO3 core? (1)
Antworten
  • <img src="image.jpg" width="100">
  • <img src="image.jpg" width="100px">
  • <f:img src="image.jpg" width="100" />
  • <f:image src="image.jpg" width="100" />
  • <f:size src="image.jpg" width="100" />

Frage 7

Frage
How can a string comparison be implemented with an If-ViewHelper? (2) Assumption: // assignment in the controller $this->view->assign('string', 'Hello');
Antworten
  • This is not possible.
  • <f:if condition="{string}=='Hello'">
  • <f:if condition="{string}='Hello'">
  • <f:if condition="{string}==Hello">
  • <f:if condition="{42:string}=={42:'Hello'}">

Frage 8

Frage
You want to add the HTML attribute data-user="fred" to the FormTextfield-ViewHelper. How can this be achieved? (2)
Antworten
  • By adding the attribute additionalAttributes="{data-user: 'fred'}"
  • By adding the attribute addAttributes="{data-user: fred}"
  • By adding the attribute data="{user: 'fred'}"
  • By adding the attribute data-user="fred"

Frage 9

Frage
What is the HTML output of the following FormTextfield-ViewHelper? (1) <f:form.textfield property="title" /> Assumptions: • The attribute “object” of the parent Form-ViewHelper reads {blog}. • The extension key reads my_extension. • The plugin name reads Bloglisting.
Antworten
  • <input type="text" name="tx_MyExtension_Bloglisting[blog][title]" value="">
  • <input type="text" name="tx_myextension_bloglisting[blog][title]" value="">
  • <input type="text" name="blog[title]" value="">
  • <input type="text" name="title" value="">
  • <input type="text" name="[blog][title]" value="">

Frage 10

Frage
Which arguments are supported by the <f:flashMessage> ViewHelper? (1)
Antworten
  • id, flash
  • id, name, title, each
  • id, class, title, queueIdentifier, as
  • renderMode, title, name
  • None of the arguments above

Frage 11

Frage
What is required to make sure that all GET parameters passed in the request are added to the link generated by the Link-ViewHelper? (2)
Antworten
  • This is the default behaviour - nothing special needs to be done
  • The attribute addQueryStringMethod must be set
  • The attribute addQueryString must be set
  • The attribute addQuery must be set
  • The attribute additionalParams must be set
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

Einstufungstest Englisch
SprachschuleAktiv
Zivilrecht - Schuldrecht Streitigkeiten
myJurazone
[Geschichte] Nachkriegsdeutschland - Die Stunde null
Marcel Pabst
Fachinformatiker AE
Marie Mirschel
Kommunikationssoziologie (KSOZ) Grimm 2017/18
Benedikt Zöchling
Vetie: MiBi 2017 - Altfragen
Johanna Tr
Vetie Histopatho 2009
Carolina Heide
Chirurgie Pferd Vetie
Anne Käfer
Vetie Para 2019
Lea AvS
Vetie Geflügelkrankheiten Fragebogen Röntgen 2, Haltung und Arten
N. H.