Ejemplo n.º 1
0
 /**
  * Create a new contentType instance.
  *
  * @return ContentType
  */
 public function create()
 {
     $class = $this->getClass();
     $contentType = new $class();
     $schema = $this->schemaManager->create();
     $schema->setObjectClass($this->contentManager->getClass());
     $contentType->setSchema($schema);
     return $contentType;
 }
Ejemplo n.º 2
0
 public function testGetClass()
 {
     $manager = new ContentManager($this->em, $this->formFactory, $this->eavManager, $this->contentClass, $this->templateClass, $this->tokenStorage);
     $this->assertEquals('Opifer\\ContentBundle\\Tests\\TestData\\Content', $manager->getClass());
 }
 /**
  * {@inheritDoc}
  */
 public function configureOptions(OptionsResolver $resolver)
 {
     $resolver->setDefaults(['multiple' => true, 'property' => 'title', 'class' => $this->contentManager->getClass()]);
 }