Quiz
6.2 Built-in ViewHelpers
Fragen in diesem Quiz (11)
1Which built-in ViewHelpers exist in the Fluid extension shipped with the TYPO3 core? (2)
- AThe AntiCrossSiteScripting-ViewHelper (to protect the content against cross-site scripting
attacks). - BThe Translate-ViewHelper (to retrieve a label from a language file)
- CThe Average-ViewHelper (to calculate the average across values of an array)
- DThe DebugViewHelper (to generate a HTML dump of the passed variable)
- EThe Style-ViewHelper (to apply CSS styles to a string)
- FThe ObfuscateEmail-ViewHelper (to obfuscate an email address)
- AThe AntiCrossSiteScripting-ViewHelper (to protect the content against cross-site scripting
2What 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>- AA 2 B C 4 D
- BA 1 B C 3 D
- C1 A B 3 C D
- D2 A B 4 C D
- EA C
3What 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>- Afoobarbaz
- Bfoofoobarbarbaz
- C0barbaz34
- Dfoobarbazfoobar
- E01234
4What 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>- AA (g) BD (r) C (y)
- Bg (A) r (BD) y (C)
- CA () BD () C ()
- D(Ag) (BDr) (Cy)
- E(gA) (rBD) (yC)
5How can comments be implemented in Fluid so that the content does not appear in the HTML source code? (2)
- A<comment>content</comment>
- B{comment}content{/comment}
- C{content -> f:comment()}
- D<!-- content -->
- E<f:comment>content</f:comment>
6How can an image be scaled down to a width of 100px by the TYPO3 core? (1)
- A<img src="image.jpg" width="100">
- B<img src="image.jpg" width="100px">
- C<f:img src="image.jpg" width="100" />
- D<f:image src="image.jpg" width="100" />
- E<f:size src="image.jpg" width="100" />
7How can a string comparison be implemented with an If-ViewHelper? (2)
Assumption:
// assignment in the controller
$this->view->assign('string', 'Hello');- AThis is not possible.
- B<f:if condition="{string}=='Hello'">
- C<f:if condition="{string}='Hello'">
- D<f:if condition="{string}==Hello">
- E<f:if condition="{42:string}=={42:'Hello'}">
8You want to add the HTML attribute data-user="fred" to the FormTextfield-ViewHelper. How can this be achieved? (2)
- ABy adding the attribute additionalAttributes="{data-user: 'fred'}"
- BBy adding the attribute addAttributes="{data-user: fred}"
- CBy adding the attribute data="{user: 'fred'}"
- DBy adding the attribute data-user="fred"
9What 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.- A<input type="text" name="tx_MyExtension_Bloglisting[blog][title]" value="">
- B<input type="text" name="tx_myextension_bloglisting[blog][title]" value="">
- C<input type="text" name="blog[title]" value="">
- D<input type="text" name="title" value="">
- E<input type="text" name="[blog][title]" value="">
10Which arguments are supported by the <f:flashMessage> ViewHelper? (1)
- Aid, flash
- Bid, name, title, each
- Cid, class, title, queueIdentifier, as
- DrenderMode, title, name
- ENone of the arguments above
11What is required to make sure that all GET parameters passed in the request are added to the link generated by
the Link-ViewHelper? (2)- AThis is the default behaviour - nothing special needs to be done
- BThe attribute addQueryStringMethod must be set
- CThe attribute addQueryString must be set
- DThe attribute addQuery must be set
- EThe attribute additionalParams must be set
Informationen
- Beschreibung
- Der Nutzer hat seine Fachbereichs-Information gelöscht. Quiz am 6.2 Built-in ViewHelpers, erstellt von Gelöschter Nutzer am 27/04/2022.
- Autor
- Gelöschter Nutzer
- Sprache
- English
- Aufrufe
- 31
- Verlauf
- Erstellt am 27 Apr 2022 · aktualisiert am 27 Apr 2022
- Schlagwörter
- Bewertung
- Noch keine Bewertungen Bewerte dieses Quiz