coldbox.system.plugins

Class Renderer

WEB-INF.cftags.component
        extended by coldbox.system.FrameworkSupertype
            extended by coldbox.system.Plugin
                extended by coldbox.system.plugins.Renderer
Class Attributes:
  • cache : false
  •  
  • output : false
  •  

    This service renders layouts, views, framework includes, etc.

    Constructor Summary
    init(any controller)
          Constructor.
    Method Summary
    private any discoverViewPaths([any view], [any module], [any explicitModule])
         Discover view paths and cache if necessary and return its locations.
    private string getAppMapping()
         Get appMapping.
    private string getLayoutsConvention()
         Get layoutsConvention.
    private string getModulesConvention()
         Get layoutsConvention.
    private string getViewsConvention()
         Get viewsConvention.
    private any implicitViewChecks()
         Does implicit view rendering checks.
    any locateLayout(any layout)
         Locate the layout to render.
    any locateModuleLayout(any layout, [any module=''], [boolean explicitModule='false'])
         Locate the view to render using module logic.
    any locateModuleView(any view, [any module=''], [boolean explicitModule='false'])
         Locate the view to render using module logic.
    any locateView(any view)
         Locate the view to render.
    Any renderExternalView(any view, [boolean cache='false'], [any cacheTimeout=''], [any cacheLastAccessTimeout=''], [any cacheSuffix=''], [any cacheProvider='template'], [any args='[runtime expression]'])
         Renders an external view.
    any renderLayout([any layout], [any view=''], [any module=''], [any args='[runtime expression]'], [any viewModule=''], [any<boolean> prepostExempt='false'])
         Renders the current layout + view Combinations if declared.
    Any renderView([any view=''], [any cache='false'], [any cacheTimeout=''], [any cacheLastAccessTimeout=''], [any cacheSuffix=''], [any cacheProvider='template'], [any module=''], [any args='[runtime expression]'], [any<coldbox.system.plugins.collection> collection], [any collectionAs=''], [any<numeric> collectionStartRow='1'], [any<numeric> collectionMaxRows='0'], [any collectionDelim=''], [any<boolean> prepostExempt='false'])
         Renders the current view.
    any renderViewCollection([any view], [any viewpath], [any viewHelperPath], [any args], [any collection], [any collectionAs], [any collectionStartRow='1'], [any collectionMaxRows='0'], [any collectionDelim=''])
         Render a view composed of collections.
    any renderViewComposite([any view], [any viewpath], [any viewHelperPath], [any args])
         Render a view composite.
    any setExplicitView(any view)
         Set the explicit view to render, usually called to create new rendering contexts.
     
    Methods inherited from class coldbox.system.Plugin
    getPluginDescription, getPluginName, getPluginVersion, getRequestCollection, getRequestContext, getpluginAuthor, getpluginAuthorURL, getpluginPath, setPluginDescription, setPluginName, setPluginVersion, setpluginAuthor, setpluginAuthorURL
     
    Methods inherited from class coldbox.system.FrameworkSupertype
    $abort, $dump, $htmlhead, $include, $rethrow, $throw, addAsset, announceInterception, getColdboxOCM, getController, getDatasource, getDebugMode, getInterceptor, getMailService, getMailSettings, getMemento, getModel, getModuleSettings, getMyPlugin, getNewMail, getPlugin, getResource, getSetting, getSettingStructure, getSettingsBean, getValidationManager, getfwLocale, includeUDF, loadGlobalUDFLibraries, locateDirectoryPath, locateFilePath, persistVariables, populateModel, relocate, runEvent, setDebugMode, setNextEvent, setNextRoute, setSetting, setfwLocale, settingExists, validateModel
     
    Methods inherited from class WEB-INF.cftags.component
    None

    Constructor Detail

    init

    public init(any controller)

    Constructor

    Parameters:
    controller

    Method Detail

    discoverViewPaths

    private any discoverViewPaths([any view], [any module], [any explicitModule])

    Discover view paths and cache if necessary and return its locations

    Parameters:
    view
    module
    explicitModule

    getAppMapping

    private string getAppMapping()

    Get appMapping


    getLayoutsConvention

    private string getLayoutsConvention()

    Get layoutsConvention


    getModulesConvention

    private string getModulesConvention()

    Get layoutsConvention


    getViewsConvention

    private string getViewsConvention()

    Get viewsConvention


    implicitViewChecks

    private any implicitViewChecks()

    Does implicit view rendering checks


    locateLayout

    public any locateLayout(any layout)

    Locate the layout to render

    Parameters:
    layout - The layout name

    locateModuleLayout

    public any locateModuleLayout(any layout, [any module=''], [boolean explicitModule='false'])

    Locate the view to render using module logic

    Parameters:
    layout - The layout name to discover
    module - The name of the module we are searching for
    explicitModule - Are we locating explicitly or implicitly for a module layout

    locateModuleView

    public any locateModuleView(any view, [any module=''], [boolean explicitModule='false'])

    Locate the view to render using module logic

    Parameters:
    view - The view name
    module - The name of the module to explicity look for a view
    explicitModule - Are we locating explicitly or implicitly for a module layout

    locateView

    public any locateView(any view)

    Locate the view to render

    Parameters:
    view - The view name

    renderExternalView

    Public Any renderExternalView(any view, [boolean cache='false'], [any cacheTimeout=''], [any cacheLastAccessTimeout=''], [any cacheSuffix=''], [any cacheProvider='template'], [any args='[runtime expression]'])

    Renders an external view.

    Overrides:
    renderExternalView in class FrameworkSupertype
    Parameters:
    view - The full path to the view. This can be an expanded path or relative. Include extension.
    cache - True if you want to cache the view.
    cacheTimeout - The cache timeout
    cacheLastAccessTimeout - The last access timeout
    cacheSuffix - Add a cache suffix to the view cache entry. Great for multi-domain caching or i18n caching.
    cacheProvider - The cache provider you want to use for storing the rendered view. By default we use the 'template' cache provider
    args - An optional set of arguments that will be available to this layouts/view rendering ONLY

    renderLayout

    Public any renderLayout([any layout], [any view=''], [any module=''], [any args='[runtime expression]'], [any viewModule=''], [any<boolean> prepostExempt='false'])

    Renders the current layout + view Combinations if declared.

    Overrides:
    renderLayout in class FrameworkSupertype
    Parameters:
    layout - The explicit layout to use in rendering
    view - The view to render within this layout explicitly
    module - Explicitly render a layout from this module by passing its module name
    args - An optional set of arguments that will be available to this layouts/view rendering ONLY
    viewModule - Explicitly render a view from this module
    prepostExempt - If true, pre/post layout interceptors will not be fired. By default they do fire

    renderView

    Public Any renderView([any view=''], [any cache='false'], [any cacheTimeout=''], [any cacheLastAccessTimeout=''], [any cacheSuffix=''], [any cacheProvider='template'], [any module=''], [any args='[runtime expression]'], [any<coldbox.system.plugins.collection> collection], [any collectionAs=''], [any<numeric> collectionStartRow='1'], [any<numeric> collectionMaxRows='0'], [any collectionDelim=''], [any<boolean> prepostExempt='false'])

    Renders the current view.

    Overrides:
    renderView in class FrameworkSupertype
    Parameters:
    view - If not passed in, the value in the currentView in the current RequestContext will be used
    cache - Cache the rendered view or not
    cacheTimeout - The cache timeout for the rendered view
    cacheLastAccessTimeout - The last access timeout for the rendered view
    cacheSuffix - Add a cache suffix to the view cache entry. Great for multi-domain caching or i18n caching.
    cacheProvider - The cache provider you want to use for storing the rendered view. By default we use the 'template' cache provider
    module - Explicitly render a view from this module by passing the module name
    args - An optional set of arguments that will be available to this layouts/view rendering ONLY
    collection - A collection to use by this Renderer to render the view as many times as the items in the collection (Array or Query)
    collectionAs - The name of the collection variable in the partial rendering. If not passed, we will use the name of the view by convention
    collectionStartRow - The start row to limit the collection rendering with
    collectionMaxRows - The max rows to iterate over the collection rendering with
    collectionDelim - A string to delimit the collection renderings by
    prepostExempt - If true, pre/post view interceptors will not be fired. By default they do fire

    renderViewCollection

    public any renderViewCollection([any view], [any viewpath], [any viewHelperPath], [any args], [any collection], [any collectionAs], [any collectionStartRow='1'], [any collectionMaxRows='0'], [any collectionDelim=''])

    Render a view composed of collections

    Parameters:
    view
    viewpath
    viewHelperPath
    args
    collection
    collectionAs
    collectionStartRow
    collectionMaxRows
    collectionDelim

    renderViewComposite

    public any renderViewComposite([any view], [any viewpath], [any viewHelperPath], [any args])

    Render a view composite

    Parameters:
    view
    viewpath
    viewHelperPath
    args

    setExplicitView

    public any setExplicitView(any view)

    Set the explicit view to render, usually called to create new rendering contexts

    Parameters:
    view - The view to explicitly set