Exemplo n.º 1
0
 public function testGetSchemaForClass()
 {
     $productSchema = $this->manager->getSchemaForClass('Ekyna\\Component\\Characteristics\\Tests\\Fixtures\\ProductCharacteristics');
     $this->assertEquals('product', $productSchema->getName());
     $productSchema = $this->manager->getSchemaForClass('Ekyna\\Component\\Characteristics\\Tests\\Fixtures\\VariantCharacteristics');
     $this->assertEquals('product', $productSchema->getName());
 }
 /**
  * Renders a characteristics view table.
  *
  * @param CharacteristicsInterface $characteristics
  * @param array $options
  *
  * @return string
  */
 public function renderCharacteristics(CharacteristicsInterface $characteristics, array $options = [])
 {
     $options = array_merge(['table_class' => 'table table-striped table-bordered table-condensed ekyna-characteristics', 'highlight_inherited' => false, 'display_group' => null], $options);
     return $this->template->render(['view' => $this->manager->createView($characteristics, $options['display_group']), 'options' => $options]);
 }