/**
  * Parse the mode, flat, parented or hierarchical.
  *
  * @param BasicDefinitionInterface $config The basic definition of the data definition.
  *
  * @return void
  */
 protected function parseBasicMode(BasicDefinitionInterface $config)
 {
     if ($config->getMode() !== null) {
         return;
     }
     switch ($this->getFromDca('list/sorting/mode')) {
         case 0:
             // Records are not sorted.
         // Records are not sorted.
         case 1:
             // Records are sorted by a fixed field.
         // Records are sorted by a fixed field.
         case 2:
             // Records are sorted by a switchable field.
         // 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).
         // 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:
     }
 }