How to properly call entity form?
&lt;?php
class MyEntityController extends ControllerBase {
  public function mymethod(AnotherEntity $anotherEntity) {
    // @todo The methods don't exist in core, so it's not clear what object they
    //   should be called on.
    //$form-&gt;setParentEntity($anotherEntity);
    //$form-&gt;setRedirectRoute(array(
    //  'route_name' =&gt; 'some.route',
    //  'route_parameters' =&gt; array('somearugment' =&gt; $anotherEntity-&gt;id()
    //));

    $myentity = $this-&gt;entityManager()-&gt;getStorageController('myentity')-&gt;create(array());
    return $this-&gt;entityFormBuilder()-&gt;getForm($myentity, 'default');
  }
}
?&gt;