GetBlockToEditTrait
trait GetBlockToEditTrait (View source)
A port of \Concrete\Controller\Backend\UserInterface\Block::getBlockToEdit functionality that can be more easily included in different situations
Methods
Given a page, area handle and block ID, retrieves a block to work with. This function exists because if the area in question is global we have to retrieve a block differently and set different data on it.
Given a block we do things like ensure the proper version of the page for that block is loaded (and sometimes create a new version); we relate edits to pages if the block is in a stack, etc.
Details
array
getBlockToWorkWith(Page $page, string $areaHandle, $blockID)
Given a page, area handle and block ID, retrieves a block to work with. This function exists because if the area in question is global we have to retrieve a block differently and set different data on it.