AddSectionController
class AddSectionController implements ContainerInjectionInterface (View source)
| internal | Controller classes are internal. |
Defines a controller to add a new section.
Traits
Provides a helper to determine if the current request is via AJAX.
Provides AJAX responses to rebuild the Layout Builder.
Properties
| protected LayoutTempstoreRepositoryInterface | $layoutTempstoreRepository | The layout tempstore repository. |
Methods
AddSectionController constructor.
Instantiates a new instance of this class.
Adds the new section.
Details
protected bool
isAjax()
Determines if the current request is via AJAX.
protected
getRequestWrapperFormat()
Gets the wrapper format of the current request.
protected AjaxResponse
rebuildAndClose(SectionStorageInterface $section_storage)
Rebuilds the layout.
protected AjaxResponse
rebuildLayout(SectionStorageInterface $section_storage)
Rebuilds the layout.
__construct(LayoutTempstoreRepositoryInterface $layout_tempstore_repository)
AddSectionController constructor.
static
create(ContainerInterface $container)
Instantiates a new instance of this class.
This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton.
Response
build(SectionStorageInterface $section_storage, int $delta, string $plugin_id)
Adds the new section.