/**
  * Ensure that the basic configuration is set in the definition.
  *
  * @param ContainerInterface $container The container where the data shall be stored.
  *
  * @return void
  */
 protected function parseBasicDefinition(ContainerInterface $container)
 {
     if (!$container->hasBasicDefinition()) {
         $config = new DefaultBasicDefinition();
         $container->setBasicDefinition($config);
     }
 }
 /**
  * Parse the basic configuration and populate the definition.
  *
  * @param ContainerInterface $container The container where the data shall be stored.
  *
  * @return void
  */
 protected function parseBasicDefinition(ContainerInterface $container)
 {
     // Parse data provider.
     if ($container->hasBasicDefinition()) {
         $config = $container->getBasicDefinition();
     } else {
         $config = new DefaultBasicDefinition();
         $container->setBasicDefinition($config);
     }
     $this->parseBasicMode($config);
     $this->parseBasicFlags($config);
     if (($filters = $this->getFromDca('list/sorting/filter')) !== null) {
         if (is_array($filters) && !empty($filters)) {
             if ($config->hasAdditionalFilter()) {
                 $builder = FilterBuilder::fromArrayForRoot($config->getAdditionalFilter())->getFilter();
             } else {
                 $builder = FilterBuilder::fromArrayForRoot()->getFilter();
             }
             foreach ($filters as $filter) {
                 // FIXME: this only takes array('name', 'value') into account. Add support for: array('name=?', 'value').
                 $builder->andPropertyEquals($filter[0], $filter[1]);
             }
             $config->setAdditionalFilter($config->getDataProvider(), $builder->getAllAsArray());
         }
     }
 }