O GoConqr está de visual novo! Conte para nós o que você achou.

Quiz

5.3 Alternative Views

Usuário eliminado 3 perguntas Atualizado em 27 abr 2022

Fazer o quiz

Perguntas do quiz (3)

  1. 1How is the JSON view used? (1)
    1. AThe template filename must end in .json
    2. BThe third parameter of method assign() of the view must be true
    3. CThe initializeAction() in the controller requires the parameter $json = true
    4. DThe property $defaultViewObjectName can be used to create a JSON response by default
    5. EA directory View must exist inside Classes, which contains a file JsonView.php
  2. 2What is the output of the following code snippet that uses Extbase’s JSON view? (1)

    use \TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
    use \TYPO3\CMS\Extbase\Mvc\View\JsonView;
    class ExampleController extends ActionController
    {
    /**
    * @var \TYPO3\CMS\Extbase\Mvc\View\JsonView
    */
    protected $defaultViewObjectName = JsonView::class;
    public function showAction()
    {
    $data = ['foo' => 'bar'];
    $this->view->assign('value', $data);
    }
    }
    1. AThe JSON payload: {"value": ["foo": "bar"]}
    2. BThe JSON payload: {"foo": "bar"}
    3. CThe JSON payload: [foo = "bar"]
    4. DA serialized array: a:1:{s:3:"foo";s:3:"bar";}
    5. EAn empty serialized array: a:0:{}
  3. 3What is the purpose of the function call setVariablesToRender() of the JSON view in Extbase? (1)
    1. AThis is required to instruct the JSON view to render variable names other than value
    2. BThis is required to instruct the JSON view to render multidimensional arrays
    3. CThis is required to instruct the JSON view to render data types other than arrays
    4. DThis can be used to switch between JSON, HTML, XML, etc. formats on a case-by-case basis

Informações

Descrição
O usuário eliminou as informações de disciplina Quiz sobre 5.3 Alternative Views, criado por Usuário eliminado em 27-04-2022.
Autor
Usuário eliminado
Idioma
English
Visualizações
28
Histórico
Criado em 27 abr 2022 · atualizado em 27 abr 2022
Avaliação
Ainda sem avaliações
Avalie este quiz
Avalie este quiz

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?