src/Contao/Dca/Builder/Legacy/LegacyDcaDataDefinitionBuilder.php
protected function parseBasicMode(BasicDefinitionInterface $config)
    {
        if (null !== $config->getMode()) {
            return;
        }

        switch ($this->getFromDca('list/sorting/mode')) {
            case 0:
                // Records are not sorted.
            case 1:
                // Records are sorted by a fixed field.
            case 2:
                // Records are sorted by a switchable field.
            case 3:
                // Records are sorted by the parent table.
                $config->setMode(BasicDefinitionInterface::MODE_FLAT);
                break;
            case 4:
                // Displays the child records of a parent record (see style sheets module).
                $config->setMode(BasicDefinitionInterface::MODE_PARENTEDLIST);
                break;
            case 5:
                // Records are displayed as tree (see site structure).
            case 6:
                // Displays the child records within a tree structure (see articles module).
                $config->setMode(BasicDefinitionInterface::MODE_HIERARCHICAL);
                break;
            default:
        }
    }
protected function parseBasicMode(BasicDefinitionInterface $config)
    {
        if (null !== $config->getMode()) {
            return;
        }

        switch ($this->getFromDca('list/sorting/mode')) {
            case 0:
                // Records are not sorted.
            case 1:
                // Records are sorted by a fixed field.
            case 2:
                // Records are sorted by a switchable field.
            case 3:
                // Records are sorted by the parent table.
                $config->setMode(BasicDefinitionInterface::MODE_FLAT);
                break;
            case 4:
                // Displays the child records of a parent record (see style sheets module).
                $config->setMode(BasicDefinitionInterface::MODE_PARENTEDLIST);
                break;
            case 5:
                // Records are displayed as tree (see site structure).
            case 6:
                // Displays the child records within a tree structure (see articles module).
                $config->setMode(BasicDefinitionInterface::MODE_HIERARCHICAL);
                break;
            default:
        }
    }
protected function parseBasicMode ( BasicDefinitionInterface $ config ) { if ( null !== $ config -> getMode ( ) ) { return ; } switch ( $ this -> getFromDca ( 'list/sorting/mode' ) ) { case 0 : // Records are not sorted. case 1 : // Records are sorted by a fixed field. case 2 : // Records are sorted by a switchable field. case 3 : // Records are sorted by the parent table. $ config -> setMode ( BasicDefinitionInterface :: MODE_FLAT ) ; break ; case 4 : // Displays the child records of a parent record (see style sheets module). $ config -> setMode ( BasicDefinitionInterface :: MODE_PARENTEDLIST ) ; break ; case 5 : // Records are displayed as tree (see site structure). case 6 : // Displays the child records within a tree structure (see articles module). $ config -> setMode ( BasicDefinitionInterface :: MODE_HIERARCHICAL ) ; break ; default : } }
Parse the mode, flat, parented or hierarchical.

@param BasicDefinitionInterface $config The basic definition of the data definition.

@return void
Parse the mode flat parented or hierarchical .