예제 #1
0
 function let(ArrayToDefinitionConverterInterface $converter, Grid $firstGrid, Grid $secondGrid, Grid $thirdGrid)
 {
     $converter->convert('sylius_admin_tax_category', ['configuration1'])->willReturn($firstGrid);
     $converter->convert('sylius_admin_product', ['configuration2'])->willReturn($secondGrid);
     $converter->convert('sylius_admin_order', ['configuration3'])->willReturn($thirdGrid);
     $this->beConstructedWith($converter, ['sylius_admin_tax_category' => ['configuration1'], 'sylius_admin_product' => ['configuration2'], 'sylius_admin_order' => ['configuration3']]);
 }
예제 #2
0
 /**
  * @param ArrayToDefinitionConverterInterface $converter
  * @param array $gridConfigurations
  */
 public function __construct(ArrayToDefinitionConverterInterface $converter, array $gridConfigurations)
 {
     foreach ($gridConfigurations as $code => $gridConfiguration) {
         if (isset($gridConfiguration['extends']) && isset($gridConfigurations[$gridConfiguration['extends']])) {
             $gridConfiguration = $this->extend($gridConfiguration, $gridConfigurations[$gridConfiguration['extends']]);
         }
         $this->grids[$code] = $converter->convert($code, $gridConfiguration);
     }
 }
예제 #3
0
 /**
  * @param ArrayToDefinitionConverterInterface $converter
  * @param array $gridConfigurations
  */
 public function __construct(ArrayToDefinitionConverterInterface $converter, array $gridConfigurations)
 {
     foreach ($gridConfigurations as $code => $gridConfiguration) {
         $this->grids[$code] = $converter->convert($code, $gridConfiguration);
     }
 }