Element
class Element implements LocatableFileInterface (View source)
An object-oriented wrapper for core element functionality, with support for events, locators, controllers and elements.
Properties
| protected string | $element | The element name.  | 
                |
| protected array | $variables | The list of variables to be "set" in the view.  | 
                |
| protected string|null | $pkgHandle | The handle of the package defining this element.  | 
                |
| protected FileLocator | $locator | The locator instance to be used to get the actual PHP file that implements the view.  | 
                |
| protected Page|null | $page | The page where the element will be rendered.  | 
                |
| protected ElementController|null | $controller | The element controller.  | 
                |
| protected array | $controllerArguments | The arguments to be used when calling the constructor of the element controller.  | 
                
Methods
Element constructor.
Initialize this instance.
Get the locator instance to be used to get the actual PHP file that implements the view.
Get the path of the element view (relative to the webroot).
Check if the element view file exists.
No description
Set a variable to be used in the view.
Get the element controller.
Render the element.
No description
No description
Details
        
                            
    __construct(string $element)
        
    
    Element constructor.
        
                            
    populateFromArguments(array $args)
        
    
    Initialize this instance.
        
                            FileLocator
    getLocator()
        
    
    Get the locator instance to be used to get the actual PHP file that implements the view.
        
                            string
    getElementPath()
        
    
    Get the path of the element view (relative to the webroot).
        
                            bool
    exists()
        
    
    Check if the element view file exists.
        
                            Record
    getFileLocatorRecord()
        
    
    No description
        
                            $this
    set(string $key, mixed $value)
        
    
    Set a variable to be used in the view.
        
                            ElementController|null
    getElementController()
        
    
    Get the element controller.
        
                            
    render()
        
    
    Render the element.
        
                    protected        FileLocator
    getBaseLocator()
        
    
    No description
        
                    protected        FileLocator
    createLocator()
        
    
    No description