Form constructor.
array $form: An associative array containing the structure of the form.
array $form_state: An associative array containing the current state of the form.
array The form structure.
Overrides FormInterface::buildForm
public function buildForm(array $form, array &$form_state, $entity_type = NULL, $bundle = NULL) {
$entity_info = $this->entityManager
->getDefinition($entity_type);
if (!empty($entity_info['bundle_prefix'])) {
$bundle = $entity_info['bundle_prefix'] . $bundle;
}
$this->entity_type = $entity_type;
$this->bundle = $bundle;
$this->adminPath = $this->entityManager
->getAdminPath($this->entity_type, $this->bundle);
}