/**
  * @return void
  */
 protected function generateTableConfigurationForProviderForms()
 {
     $resolver = new Resolver();
     $forms = Core::getRegisteredFormsForTables();
     $packages = $this->getInstalledFluxPackages();
     $models = $resolver->resolveDomainFormClassInstancesFromPackages($packages);
     foreach ($forms as $fullTableName => $form) {
         $this->processFormForTable($fullTableName, $form);
     }
     foreach ($models as $modelClassName => $form) {
         $fullTableName = $resolver->resolveDatabaseTableName($modelClassName);
         if (NULL === $form) {
             $form = $this->generateFormInstanceFromClassName($modelClassName, $fullTableName);
         }
         if (NULL === $form->getName()) {
             $form->setName($fullTableName);
         }
         $this->processFormForTable($fullTableName, $form);
     }
 }
示例#2
0
 /**
  * @test
  * @dataProvider getClassToTableTestValues
  * @param string $class
  * @param string $expectedTable
  */
 public function testResolveTableName($class, $expectedTable)
 {
     $resolver = new Resolver();
     $result = $resolver->resolveDatabaseTableName($class);
     $this->assertEquals($expectedTable, $result);
 }