You are here

public function Embed::flowForm in CMS Content Sync 2.1.x

1 call to Embed::flowForm()
Embed::flowEditForm in src/Controller/Embed.php
1 string reference to 'Embed::flowForm'
cms_content_sync.routing.yml in ./cms_content_sync.routing.yml
cms_content_sync.routing.yml

File

src/Controller/Embed.php, line 147

Class

Embed
Class Embed provides helpers to embed Sync Core functionality into the site.

Namespace

Drupal\cms_content_sync\Controller

Code

public function flowForm(?Flow $flow) {
  $this
    ->init();
  $controller = $flow ? $flow
    ->getController() : null;
  $embed = $this->embedService
    ->flowForm($controller && $controller instanceof FlowControllerSimple ? $controller
    ->getFormValues() : FlowControllerSimple::getFormValuesForNewFlow($flow));
  return $this
    ->run($embed, [
    'form' => \Drupal::formBuilder()
      ->getForm(JsonForm::class),
  ]);
}