Пример #1
0
 /**
  * Create a new form instance.
  *
  * @return Form
  */
 public function create()
 {
     $class = $this->getClass();
     $form = new $class();
     $schema = $this->schemaManager->create();
     $schema->setObjectClass($this->postManager->getClass());
     $form->setSchema($schema);
     return $form;
 }
Пример #2
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;
 }