Areas
class Areas extends ApiController implements ApplicationAwareInterface (View source)
Traits
Trait ApplicationAwareTrait A trait used with ApplicationAwareInterface
A port of \Concrete\Controller\Backend\UserInterface\Block::getBlockToEdit functionality that can be more easily included in different situations
A port of \Concrete\Controller\Dialog\Block::validateBlock functionality that can be more easily included in different situations
Trait ApplicationAwareTrait A trait used with ApplicationAwareInterface
Properties
| protected Application | $app | from ApplicationAwareTrait | |
| protected Request | $request | from ApiController | 
Methods
Returns an error response in the standard Concrete error response format.
Transforms an object using the API transformer
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.
No description
No description
No description
Details
        
                            
    setApplication(Application $app)
        
    
    Setter method for the application
        
                            
    __construct(Request $request)
        
    
    No description
        
                    protected        JsonResponse
    error($message, int $code = 400)
        
    
    Returns an error response in the standard Concrete error response format.
        
                            Item
    transform($object, TransformerAbstract $transformer, string $resourceKey = null)
        
    
    Transforms an object using the API transformer
        
                            
    deleted(string $objectType, string $id)
        
    
    No description
        
                            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.
        
                            Block|null
    getBlockToEdit(Page $page, Area $area, string $areaHandle, $blockID)
        
    
    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.
..
        
                            JsonResponse|null
    validateBlock(Block $b, array $postBody)
        
    
    No description
        
                            
    addBlock($pageID, $areaHandle)
        
    
    No description
        
                            
    deleteBlock($pageID, $areaHandle, $blockID)
        
    
    No description
        
                            
    updateBlock($pageID, $areaHandle, $blockID)
        
    
    No description