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

Quiz

4.3 Models, Repositories and Relations

Usuário eliminado 21 perguntas Atualizado em 27 abr 2022

Fazer o quiz

Perguntas do quiz (21)

  1. 1Which of the following statements about domain models in Extbase is correct? (1)
    1. AThree different basis objects exist: entity, value object and factory
    2. BProperties of models should be accessed and modified directly
    3. CA “getter” method should be used to access a property
    4. DThe visibility of domain model properties in Extbase should be public
    5. EAll options listed above are wrong
  2. 2What is required in an Extbase repository to prevent it from returning deleted records? (1)
    1. AThe TypoScript setting setup.tx_extbase.view.hidden = 0 must be set
    2. BThe query setting setIncludeDeleted(false) must be set
    3. CThe parameter true must be passed to the repository method findAll()
    4. DThe parameter true must be passed to the repository method execute()
    5. ENothing: the repository does not return deleted records by default
  3. 3What needs to be done in an Extbase repository to include hidden and deleted records in the result set? (1)
    1. AThis is not possible. Deleted records are removed from the database
    2. BBoth query settings setIncludeHidden() and setIncludeDeleted() need to be set to true
    3. CBoth query settings setIgnoreEnableFields() and setEnableFieldsToBeIgnored() need to be
      set appropriately
    4. DThe TCA configuration ['ctrl']['ignoreEnableFields'] of the table need to be set to true
  4. 4Which type of relation is not possible with TCA’s inline field type (IRRE)? (1)
    1. A1:n
    2. Bn:1
    3. C1:1
    4. Dm:n
    5. EIRRE supports all types of relations
  5. 5Which property annotation is required to define a relation of type 1:n in your domain model? (1)
    1. A/**
      * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage
      */
    2. B/**
      * @var \Foo\Bar\Domain\Model\Post
      */
    3. C/**
      * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Foo\Bar\Domain\Model\Post>
      */
    4. D/**
      * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage[\Foo\Bar\Domain\Model\Post]
      */
    5. E/**
      * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<1:n><\Foo\Bar\Domain\Model\Post>
      */
  6. 6Which repository method tests whether the value of a domain model property, which has a m:n relation, contains a specific value? (1)
    1. Ain()
    2. Bbetween()
    3. Ccontains()
    4. Dis()
    5. Einbetween()
  7. 7Which repository method tests whether the value of a domain model property is included in a list of possible
    values? (1)
    1. Ain()
    2. Bbetween()
    3. Ccontains()
    4. Dis()
    5. Einbetween()
  8. 8What needs to be configured to instruct all methods of a repository to return results ordered by a specific property? (1)
    1. AThis can be achieved in a TypoScript file.
    2. BBy passing the parameter $order in the method’s signature
    3. CBy adding the @sort annotation to the domain model
    4. DBy setting the $defaultOrderings property in the repository class
    5. EBy adding an appropriate sortby property to the TCA
  9. 9Which statements about the following code snippet are correct? (2)
    <?php
    namespace Vendor\MyExtension\Domain\Repository;
    use \TYPO3\CMS\Extbase\Persistence\Repository;
    use \TYPO3\CMS\Extbase\Persistence\QueryInterface;

    class ExampleRepository extends Repository
    {
    protected $defaultOrderings = [
    'title' => QueryInterface::ORDER_DESCENDING
    ];
    ...
    }
    1. ARecords read from this repository are sorted by their title field in descending order by default
    2. BThe additional configuration sortBy is required in the TCA of the repository to set the default sort order
    3. CThe property $defaultOrderings has no effect by default
    4. DThe constant ORDER_ASCENDING can be used instead of ORDER_DESCENDING to sort in ascending order
    5. EIf the property $defaultOrderings would not exist, the repository would use the sorting
      defined in the TCA
  10. 10Assuming two domain objects Book and Chapters exist, which have a 1:n-relation. How can you determine all chapters of a book which match a search string? (1)
    1. ABy searching in the Book repository and by using in() on the property chapters
    2. BBy searching in the Book repository and by using contains() on the property chapters
    3. CBy searching in the Chapters repository and by using in() on the property books
    4. DBy searching in the Chapters repository and by using contains() on the property books
    5. EBy searching in the Chapters repository and iterating all records to find the appropriate
      chapters

Informações

Descrição
O usuário eliminou as informações de disciplina Quiz sobre 4.3 Models, Repositories and Relations, criado por Usuário eliminado em 27-04-2022.
Autor
Usuário eliminado
Idioma
English
Visualizações
21
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?