Example #1
0
 /**
  * Get a form by a schema
  *
  * @param string $schema
  *
  * @return FormView
  */
 public function formFromValue(FormValue $value)
 {
     if (null === ($schema = $value->getSchema())) {
         return false;
     }
     $entity = $this->eavManager->initializeEntity($schema);
     $form = $this->formFactory->create('eav_post', $entity, ['valueId' => $value->getId()]);
     return $form->createView();
 }