6.2 Built-in ViewHelpers

Descripción

TYPO3 CD 2020 (zweite Auflage) Test sobre 6.2 Built-in ViewHelpers, creado por Pascal Bartl el 09/04/2021.
Pascal Bartl
Test por Pascal Bartl, actualizado hace más de 1 año
Pascal Bartl
Creado por Pascal Bartl hace más de 3 años
2
0

Resumen del Recurso

Pregunta 1

Pregunta
Which built-in ViewHelpers exist in the Fluid extension shipped with the TYPO3 core? (2)
Respuesta
  • 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)

Pregunta 2

Pregunta
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>
Respuesta
  • 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

Pregunta 3

Pregunta
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>
Respuesta
  • foobarbaz
  • foofoobarbarbaz
  • 0barbaz34
  • foobarbazfoobar
  • 01234

Pregunta 4

Pregunta
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>
Respuesta
  • A (g) BD (r) C (y)
  • g (A) r (BD) y (C)
  • A () BD () C ()
  • (Ag) (BDr) (Cy)
  • (gA) (rBD) (yC)

Pregunta 5

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

Pregunta 6

Pregunta
How can an image be scaled down to a width of 100px by the TYPO3 core? (1)
Respuesta
  • <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" />

Pregunta 7

Pregunta
How can a string comparison be implemented with an If-ViewHelper? (2) Assumption: // assignment in the controller $this->view->assign('string', 'Hello');
Respuesta
  • 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'}">

Pregunta 8

Pregunta
You want to add the HTML attribute data-user="fred" to the FormTextfield-ViewHelper. How can this be achieved? (2)
Respuesta
  • 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"

Pregunta 9

Pregunta
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.
Respuesta
  • <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="">

Pregunta 10

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

Pregunta 11

Pregunta
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)
Respuesta
  • 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
Mostrar resumen completo Ocultar resumen completo

Similar

Fechas Importantes Constitucion
milagrosalopez
Las Matemáticas
María Salinas
Ejemplo Prueba de Inglés para el Saber Pro
D. Valenzuela
Fichas de Inglés para la Prepa Abierta
Raúl Fox
Que compuestos quimicos inorganicos se encuentran en:
Marcelo Rios Vega
La Dictadura Franquista Selectividad
Diego Santos
Os determinantes en galego.
Isabel Mª Barcón Soto
GS-1. GUARDIAS DE ORDEN Y GUARDIAS DE LOS SERVICIOS
antonio del valle
Transporte a través de membrana.
heydi beltran
Las Alteraciones
mariajesus camino
DICTADO RÍTMICO 4 TIEMPOS
mariajesus camino