45 $this->itemFactory = $item_factory;
46 $this->responseHandler = $response_handler;
52 public static function create(ContainerInterface $container) {
54 $container->get(
'paragraphs_editor.edit_buffer.item_factory'),
55 $container->get(
'paragraphs_editor.command.response_handler')
78 if (empty($bundle_name)) {
79 $response = $this->responseHandler->deliverBundleSelectForm($context);
82 $item = $this->itemFactory->createBufferItem($context, $bundle_name);
83 $response = $this->responseHandler->deliverParagraphEditForm($context, $item);
103 $item = $this->itemFactory->getBufferItem($context, $paragraph_uuid);
104 return $this->responseHandler->deliverParagraphEditForm($context, $item);
122 $item = $this->itemFactory->getBufferItem($context, $paragraph_uuid);
123 return $this->responseHandler->deliverRenderedParagraph($context, $item);
147 $item = $this->itemFactory->getBufferItem($source_context, $paragraph_uuid);
148 $item = $this->itemFactory->duplicateBufferItem($target_context, $item);
150 return $this->responseHandler->deliverDuplicate($target_context, $item, $editor_widget_id);
168 return $this->responseHandler->deliverCloseForm($context);
edit(CommandContextInterface $context, $paragraph_uuid)
duplicate(CommandContextInterface $target_context, CommandContextInterface $source_context, $paragraph_uuid, $editor_widget_id)
__construct(EditBufferItemFactoryInterface $item_factory, ResponseHandlerInterface $response_handler)
insert(CommandContextInterface $context, $bundle_name=NULL)
static create(ContainerInterface $container)
render(CommandContextInterface $context, $paragraph_uuid)
cancel(CommandContextInterface $context)