Class View

View, the V in the MVC triad. View interacts with Helpers and view variables passed in from the controller to render the results of the controller action. Often this is HTML, but can also take the form of JSON, XML, PDF's or streaming files.

CakePHP uses a two-step-view pattern. This means that the view content is rendered first, and then inserted into the selected layout. This also means you can pass data from the view to the layout using $this->set()

Since 2.1, the base View class also includes support for themes by default. Theme views are regular view files that can provide unique HTML and static assets. If theme views are not found for the current view the default app view files will be used. You can set $this->theme = 'mytheme' in your Controller to use the Themes.

Example of theme path with $this->theme = 'SuperHot'; Would be app/View/Themed/SuperHot/Posts

CakeObject
Extended by View

Direct Subclasses

Package: Cake\View
Copyright: Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
License: MIT License
Location: Cake/View/View.php

Constants summary

Properties summary

  • $Blocks public
    ViewBlock instance.
  • $Helpers public
    Helpers collection
  • $_current protected
    string
    The currently rendering view file. Used for resolving parent files.
  • $_currentType protected
    string

    Currently rendering an element. Used for finding parent fragments for elements.

  • $_eventManager protected

    Instance of the CakeEventManager this View object is using to dispatch inner events. Usually the manager is shared with the controller, so it it possible to register view events in the controller layer.

  • boolean
    Whether the event manager was already configured for this object
  • $_parents protected
    array
    The names of views and their parents used with View::extend();
  • $_passedVars protected
    array
    List of variables to collect from the associated controller.
  • $_paths protected
    array
    Holds an array of paths.
  • $_pathsForPlugin protected
    array
    Holds an array of plugin paths.
  • $_scripts protected
    array
    Scripts (and/or other tags) for the layout.
  • $_stack protected
    array
    Content stack, used for nested templates that all use View::extend();
  • $autoLayout public
    boolean

    Turns on or off CakePHP's conventional mode of applying layout files. On by default. Setting to off means that layouts will not be automatically applied to rendered views.

  • $cacheAction public
    mixed
    Used to define methods a controller that will be cached.
  • $elementCache public
    string

    The Cache configuration View will use to store cached elements. Changing this will change the default configuration elements are stored under. You can also choose a cache config per element.

  • array
    Element cache settings
  • $ext public
    string
    File extension. Defaults to CakePHP's template ".ctp".
  • $hasRendered public
    boolean
    True when the view has been rendered.
  • $helpers public
    mixed
    An array of names of built-in helpers to include.
  • $layout public
    string
    Name of layout to use with this View.
  • $layoutPath public
    string
    Path to Layout.
  • $name public
    string
    Name of the controller.
  • $passedArgs public
    mixed
    Current passed params
  • $plugin public
    string
    Name of the plugin.
  • $request public

    An instance of a CakeRequest object that contains information about the current request. This object contains all the information about a request and several methods for reading additional information about the request.

  • $response public
    Reference to the Response object
  • $subDir public
    string

    Sub-directory for this view file. This is often used for extension based routing. Eg. With an xml extension, $subDir would be xml/

  • $theme public
    string
    Theme name.
  • $uuids public
    array
    List of generated DOM UUIDs.
  • array
    Holds current errors for the model validation.
  • $view public
    string
    Name of view to use with this View.
  • $viewPath public
    string
    Path to View.
  • $viewVars public
    array
    Variables for the view
  • Magic properties summary

    Method Summary

    • __construct() public
      Constructor
    • __get() public
      Magic accessor for helpers. Provides access to attributes that were deprecated.
    • __isset() public
      Magic isset check for deprecated attributes.
    • __set() public
      Magic accessor for deprecated attributes.
    • _elementCache() protected
      Checks if an element is cached and returns the cached data if present
    • _evaluate() protected
      Sandbox method to evaluate a template / view script in.
    • Finds an element filename, returns false on failure.
    • _getExtensions() protected
      Get the extensions that view files can use.
    • Returns layout filename for this template as a string.
    • _getViewFileName() protected

      Returns filename of given action's template file (.ctp) as a string. CamelCased action names will be under_scored! This means that you can have LongActionNames that refer to long_action_names.ctp views.

    • _paths() protected
      Return all possible paths to find view files in order
    • _render() protected

      Renders and returns output for given view filename with its array of data. Handles parent/extended views.

    • _renderElement() protected

      Renders an element and fires the before and afterRender callbacks for it and writes to the cache if a cache is used

    • addScript() public

      Adds a script block or other element to be inserted in $scripts_for_layout in the <head /> of a document layout

    • append() public

      Append to an existing or new block. Appending to a new block will create the block.

    • assign() public

      Set the content for a block. This will overwrite any existing content.

    • blocks() public
      Get the names of all the existing blocks.
    • element() public
      Renders a piece of PHP with provided parameters and returns HTML, XML, or any other string.
    • Checks if an element exists
    • end() public
      End a capturing block. The compliment to View::start()
    • exists() public
      Check if a block exists
    • extend() public

      Provides view or element extension/inheritance. Views can extends a parent view and populate blocks in the parent template.

    • fetch() public

      Fetch the content for a block. If a block is empty or undefined '' will be returned.

    • get() public
      Returns the contents of the given View variable.
    • Retrieve the current view type
    • Returns the CakeEventManager manager instance that is handling any callbacks. You can use this instance to register any new listeners or callbacks to the controller events, or create your own events and trigger them at will.

    • getVar() public
      Returns the contents of the given View variable(s)
    • getVars() public
      Returns a list of variables available in the current View context
    • loadHelper() public
      Loads a helper. Delegates to the HelperCollection::load() to load the helper
    • loadHelpers() public
      Interact with the HelperCollection to load all the helpers.
    • pluginSplit() public

      Splits a dot syntax plugin name into its plugin and filename. If $name does not have a dot, then index 0 will be null. It checks if the plugin is loaded, else filename will stay unchanged for filenames containing dot

    • prepend() public

      Prepend to an existing or new block. Prepending to a new block will create the block.

    • render() public
      Renders view for given view file and layout.
    • renderCache() public

      Render cached view. Works in concert with CacheHelper and Dispatcher to render cached view files.

    • Renders a layout. Returns output from _render(). Returns false on error. Several variables are created for use in layout.

    • set() public

      Allows a template or element to set a variable that will be available in a layout or other element. Analogous to Controller::set().

    • start() public
      Start capturing output for a 'block'
    • Start capturing output for a 'block' if it has no content
    • uuid() public
      Generates a unique, non-random DOM ID for an object, based on the object type and the target URL.

    Method Detail

    __construct()source public

    __construct( Controller $controller null )

    Constructor

    Parameters

    Controller $controller optional null
    A controller object to pull View::_passedVars from.

    Overrides

    CakeObject::__construct()

    __get()source public

    __get( string $name )

    Magic accessor for helpers. Provides access to attributes that were deprecated.

    Parameters

    string $name
    Name of the attribute to get.

    Returns

    mixed

    __isset()source public

    __isset( string $name )

    Magic isset check for deprecated attributes.

    Parameters

    string $name
    Name of the attribute to check.

    Returns

    boolean

    __set()source public

    __set( string $name , mixed $value )

    Magic accessor for deprecated attributes.

    Parameters

    string $name
    Name of the attribute to set.
    mixed $value
    Value of the attribute to set.

    Returns

    mixed

    _elementCache()source protected

    _elementCache( string $name , string $data , array $options )

    Checks if an element is cached and returns the cached data if present

    Parameters

    string $name
    Element name
    string $data
    Data
    array $options
    Element options

    Returns

    string|null

    _evaluate()source protected

    _evaluate( string $viewFile , array $dataForView )

    Sandbox method to evaluate a template / view script in.

    Parameters

    string $viewFile
    Filename of the view
    array $dataForView

    Data to include in rendered view. If empty the current View::$viewVars will be used.

    Returns

    string
    Rendered output

    _getElementFileName()source protected

    _getElementFileName( string $name )

    Finds an element filename, returns false on failure.

    Parameters

    string $name
    The name of the element to find.

    Returns

    mixed
    Either a string to the element filename or false when one can't be found.

    _getExtensions()source protected

    _getExtensions( )

    Get the extensions that view files can use.

    Returns

    array
    Array of extensions view files use.

    _getLayoutFileName()source protected

    _getLayoutFileName( string $name null )

    Returns layout filename for this template as a string.

    Parameters

    string $name optional null
    The name of the layout to find.

    Returns

    string
    Filename for layout file (.ctp).

    Throws

    MissingLayoutException
    when a layout cannot be located

    _getViewFileName()source protected

    _getViewFileName( string $name null )

    Returns filename of given action's template file (.ctp) as a string. CamelCased action names will be under_scored! This means that you can have LongActionNames that refer to long_action_names.ctp views.

    Parameters

    string $name optional null
    Controller action to find template filename for

    Returns

    string
    Template filename

    Throws

    MissingViewException
    when a view file could not be found.

    _paths()source protected

    _paths( string $plugin null , boolean $cached true )

    Return all possible paths to find view files in order

    Parameters

    string $plugin optional null
    Optional plugin name to scan for view files.
    boolean $cached optional true
    Set to false to force a refresh of view paths. Default true.

    Returns

    array
    paths

    _render()source protected

    _render( string $viewFile , array $data array() )

    Renders and returns output for given view filename with its array of data. Handles parent/extended views.

    Parameters

    string $viewFile
    Filename of the view
    array $data optional array()
    Data to include in rendered view. If empty the current View::$viewVars will be used.

    Returns

    string
    Rendered output

    Throws

    CakeException
    when a block is left open.

    Triggers

    View.beforeRenderFile $this, array($viewFile)
    View.afterRenderFile $this, array($viewFile, $content)

    _renderElement()source protected

    _renderElement( string $file , array $data , array $options )

    Renders an element and fires the before and afterRender callbacks for it and writes to the cache if a cache is used

    Parameters

    string $file
    Element file path
    array $data
    Data to render
    array $options
    Element options

    Returns

    string

    Triggers

    View.beforeRender $this, array($file)
    View.afterRender $this, array($file, $element)

    addScript()source public

    addScript( string $name , string $content null )

    Adds a script block or other element to be inserted in $scripts_for_layout in the <head /> of a document layout

    Deprecated

    3.0.0 Will be removed in 3.0. Superseded by blocks functionality.

    Parameters

    string $name

    Either the key name for the script, or the script content. Name can be used to update/replace a script element.

    string $content optional null
    The content of the script being added, optional.

    See

    View::start()

    append()source public

    append( string $name , mixed $value null )

    Append to an existing or new block. Appending to a new block will create the block.

    Parameters

    string $name
    Name of the block
    mixed $value optional null
    The content for the block.

    See

    ViewBlock::concat()

    assign()source public

    assign( string $name , mixed $value )

    Set the content for a block. This will overwrite any existing content.

    Parameters

    string $name
    Name of the block
    mixed $value
    The content for the block.

    See

    ViewBlock::set()

    blocks()source public

    blocks( )

    Get the names of all the existing blocks.

    Returns

    array
    An array containing the blocks.

    See

    ViewBlock::keys()

    element()source public

    element( string $name , array $data array() , array $options array() )

    Renders a piece of PHP with provided parameters and returns HTML, XML, or any other string.

    This realizes the concept of Elements, (or "partial layouts") and the $params array is used to send data to be used in the element. Elements can be cached improving performance by using the cache option.

    Parameters

    string $name

    Name of template file in the/app/View/Elements/ folder, or MyPlugin.template to use the template element from MyPlugin. If the element is not found in the plugin, the normal view path cascade will be searched.

    array $data optional array()
    Array of data to be made available to the rendered view (i.e. the Element)
    array $options optional array()

    Array of options. Possible keys are: - cache - Can either be true, to enable caching using the config in View::$elementCache. Or an array If an array, the following keys can be used: - config - Used to store the cached element in a custom cache configuration. - key - Used to define the key used in the Cache::write(). It will be prefixed with element_ - plugin - (deprecated!) Load an element from a specific plugin. This option is deprecated, and will be removed in CakePHP 3.0. Use Plugin.element_name instead. - callbacks - Set to true to fire beforeRender and afterRender helper callbacks for this element. Defaults to false. - ignoreMissing - Used to allow missing elements. Set to true to not trigger notices.

    Returns

    string
    Rendered Element

    elementExists()source public

    elementExists( string $name )

    Checks if an element exists

    Parameters

    string $name

    Name of template file in the /app/View/Elements/ folder, or MyPlugin.template to check the template element from MyPlugin. If the element is not found in the plugin, the normal view path cascade will be searched.

    Returns

    boolean
    Success

    end()source public

    end( )

    End a capturing block. The compliment to View::start()

    See

    ViewBlock::end()

    exists()source public

    exists( string $name )

    Check if a block exists

    Parameters

    string $name
    Name of the block

    Returns

    boolean

    extend()source public

    extend( string $name )

    Provides view or element extension/inheritance. Views can extends a parent view and populate blocks in the parent template.

    Parameters

    string $name
    The view or element to 'extend' the current one with.

    Throws

    LogicException
    when you extend a view with itself or make extend loops.
    LogicException
    when you extend an element which doesn't exist

    fetch()source public

    fetch( string $name , string $default '' )

    Fetch the content for a block. If a block is empty or undefined '' will be returned.

    Parameters

    string $name
    Name of the block
    string $default optional ''
    Default text

    Returns

    string
    default The block content or $default if the block does not exist.

    See

    ViewBlock::get()

    get()source public

    get( string $var , mixed $default null )

    Returns the contents of the given View variable.

    Parameters

    string $var
    The view var you want the contents of.
    mixed $default optional null
    The default/fallback content of $var.

    Returns

    mixed
    The content of the named var if its set, otherwise $default.

    getCurrentType()source public

    getCurrentType( )

    Retrieve the current view type

    Returns

    string

    getEventManager()source public

    getEventManager( )

    Returns the CakeEventManager manager instance that is handling any callbacks. You can use this instance to register any new listeners or callbacks to the controller events, or create your own events and trigger them at will.

    Returns

    CakeEventManager

    getVar()source public

    getVar( string $var )

    Returns the contents of the given View variable(s)

    Deprecated

    3.0.0 Will be removed in 3.0. Use View::get() instead.

    Parameters

    string $var
    The view var you want the contents of.

    Returns

    mixed
    The content of the named var if its set, otherwise null.

    getVars()source public

    getVars( )

    Returns a list of variables available in the current View context

    Returns

    array
    Array of the set view variable names.

    loadHelper()source public

    loadHelper( string $helperName , array $settings array() )

    Loads a helper. Delegates to the HelperCollection::load() to load the helper

    Parameters

    string $helperName
    Name of the helper to load.
    array $settings optional array()
    Settings for the helper

    Returns

    Helper
    a constructed helper object.

    See

    HelperCollection::load()

    loadHelpers()source public

    loadHelpers( )

    Interact with the HelperCollection to load all the helpers.

    pluginSplit()source public

    pluginSplit( string $name , boolean $fallback true )

    Splits a dot syntax plugin name into its plugin and filename. If $name does not have a dot, then index 0 will be null. It checks if the plugin is loaded, else filename will stay unchanged for filenames containing dot

    Parameters

    string $name
    The name you want to plugin split.
    boolean $fallback optional true
    If true uses the plugin set in the current CakeRequest when parsed plugin is not loaded

    Returns

    array
    Array with 2 indexes. 0 => plugin name, 1 => filename

    prepend()source public

    prepend( string $name , mixed $value null )

    Prepend to an existing or new block. Prepending to a new block will create the block.

    Parameters

    string $name
    Name of the block
    mixed $value optional null
    The content for the block.

    See

    ViewBlock::concat()

    render()source public

    render( string $view null , string $layout null )

    Renders view for given view file and layout.

    Render triggers helper callbacks, which are fired before and after the view are rendered, as well as before and after the layout. The helper callbacks are called:

    • beforeRender
    • afterRender
    • beforeLayout
    • afterLayout

    If View::$autoRender is false and no $layout is provided, the view will be returned bare.

    View and layout names can point to plugin views/layouts. Using the Plugin.view syntax a plugin view/layout can be used instead of the app ones. If the chosen plugin is not found the view will be located along the regular view path cascade.

    Parameters

    string $view optional null
    Name of view file to use
    string $layout optional null
    Layout to use.

    Returns

    string|null
    Rendered content or null if content already rendered and returned earlier.

    Throws

    CakeException
    If there is an error in the view.

    Triggers

    View.beforeRender $this, array($viewFileName)
    View.afterRender $this, array($viewFileName)

    renderCache()source public

    renderCache( string $filename , string $timeStart )

    Render cached view. Works in concert with CacheHelper and Dispatcher to render cached view files.

    Parameters

    string $filename
    the cache file to include
    string $timeStart
    the page render start time

    Returns

    boolean
    Success of rendering the cached file.

    renderLayout()source public

    renderLayout( string $content , string $layout null )

    Renders a layout. Returns output from _render(). Returns false on error. Several variables are created for use in layout.

    • title_for_layout - A backwards compatible place holder, you should set this value if you want more control.
    • content_for_layout - contains rendered view file
    • scripts_for_layout - Contains content added with addScript() as well as any content in the 'meta', 'css', and 'script' blocks. They are appended in that order.

    Deprecated features:

    • $scripts_for_layout is deprecated and will be removed in CakePHP 3.0. Use the block features instead. meta, css and script will be populated by the matching methods on HtmlHelper.
    • $title_for_layout is deprecated and will be removed in CakePHP 3.0. Use the title block instead.
    • $content_for_layout is deprecated and will be removed in CakePHP 3.0. Use the content block instead.

    Parameters

    string $content
    Content to render in a view, wrapped by the surrounding layout.
    string $layout optional null
    Layout name

    Returns

    mixed
    Rendered output, or false on error

    Throws

    CakeException
    if there is an error in the view.

    Triggers

    View.beforeLayout $this, array($layoutFileName)
    View.afterLayout $this, array($layoutFileName)

    set()source public

    set( string|array $one , string|array $two null )

    Allows a template or element to set a variable that will be available in a layout or other element. Analogous to Controller::set().

    Parameters

    string|array $one
    A string or an array of data.
    string|array $two optional null

    Value in case $one is a string (which then works as the key). Unused if $one is an associative array, otherwise serves as the values to $one's keys.

    start()source public

    start( string $name )

    Start capturing output for a 'block'

    Parameters

    string $name
    The name of the block to capture for.

    See

    ViewBlock::start()

    startIfEmpty()source public

    startIfEmpty( string $name )

    Start capturing output for a 'block' if it has no content

    Parameters

    string $name
    The name of the block to capture for.

    See

    ViewBlock::startIfEmpty()

    uuid()source public

    uuid( string $object , string $url )

    Generates a unique, non-random DOM ID for an object, based on the object type and the target URL.

    Parameters

    string $object
    Type of object, i.e. 'form' or 'link'
    string $url
    The object's target URL

    Returns

    string

    Methods inherited from CakeObject

    _mergeVars()source protected

    _mergeVars( array $properties , string $class , boolean $normalize true )

    Merges this objects $property with the property in $class' definition. This classes value for the property will be merged on top of $class'

    This provides some of the DRY magic CakePHP provides. If you want to shut it off, redefine this method as an empty function.

    Parameters

    array $properties
    The name of the properties to merge.
    string $class
    The class to merge the property with.
    boolean $normalize optional true
    Set to true to run the properties through Hash::normalize() before merging.

    _set()source protected

    _set( array $properties array() )

    Allows setting of multiple properties of the object in a single line of code. Will only set properties that are part of a class declaration.

    Parameters

    array $properties optional array()
    An associative array containing properties and corresponding values.

    _stop()source protected

    _stop( integer|string $status 0 )

    Stop execution of the current script. Wraps exit() making testing easier.

    Parameters

    integer|string $status optional 0
    see http://php.net/exit for values

    dispatchMethod()source public

    dispatchMethod( string $method , array $params array() )

    Calls a method on this object with the given parameters. Provides an OO wrapper for call_user_func_array

    Parameters

    string $method
    Name of the method to call
    array $params optional array()
    Parameter list to use when calling $method

    Returns

    mixed
    Returns the result of the method call

    log()source public

    log( string $msg , integer $type LOG_ERR , null|string|array $scope null )

    Convenience method to write a message to CakeLog. See CakeLog::write() for more information on writing to logs.

    Parameters

    string $msg
    Log message
    integer $type optional LOG_ERR
    Error type constant. Defined in app/Config/core.php.
    null|string|array $scope optional null

    The scope(s) a log message is being created in. See CakeLog::config() for more information on logging scopes.

    Returns

    boolean
    Success of log write

    requestAction()source public

    requestAction( string|array $url , array $extra array() )

    Calls a controller's method from any location. Can be used to connect controllers together or tie plugins into a main application. requestAction can be used to return rendered views or fetch the return value from controller actions.

    Under the hood this method uses Router::reverse() to convert the $url parameter into a string URL. You should use URL formats that are compatible with Router::reverse()

    Passing POST and GET data

    POST and GET data can be simulated in requestAction. Use $extra['url'] for GET data. The $extra['data'] parameter allows POST data simulation.

    Parameters

    string|array $url

    String or array-based URL. Unlike other URL arrays in CakePHP, this URL will not automatically handle passed and named arguments in the $url parameter.

    array $extra optional array()

    if array includes the key "return" it sets the AutoRender to true. Can also be used to submit GET/POST data, and named/passed arguments.

    Returns

    mixed

    Boolean true or false on success/failure, or contents of rendered action if 'return' is set in $extra.


    toString()source public

    toString( )

    CakeObject-to-string conversion. Each class can override this method as necessary.

    Returns

    string
    The name of this class

    Properties detail

    $Blockssource

    public ViewBlock

    ViewBlock instance.

    $Helperssource

    public HelperCollection

    Helpers collection

    $_currentsource

    protected string

    The currently rendering view file. Used for resolving parent files.

    null

    $_currentTypesource

    protected string

    Currently rendering an element. Used for finding parent fragments for elements.

    ''

    $_eventManagersource

    protected CakeEventManager

    Instance of the CakeEventManager this View object is using to dispatch inner events. Usually the manager is shared with the controller, so it it possible to register view events in the controller layer.

    null

    $_eventManagerConfiguredsource

    protected boolean

    Whether the event manager was already configured for this object

    false

    $_parentssource

    protected array

    The names of views and their parents used with View::extend();

    array()

    $_passedVarssource

    protected array

    List of variables to collect from the associated controller.

    array(
        'viewVars', 'autoLayout', 'ext', 'helpers', 'view', 'layout', 'name', 'theme',
        'layoutPath', 'viewPath', 'request', 'plugin', 'passedArgs', 'cacheAction'
    )

    $_pathssource

    protected array

    Holds an array of paths.

    array()

    $_pathsForPluginsource

    protected array

    Holds an array of plugin paths.

    array()

    $_scriptssource

    protected array

    Scripts (and/or other

    tags) for the layout.
    array()

    $_stacksource

    protected array

    Content stack, used for nested templates that all use View::extend();

    array()

    $autoLayoutsource

    public boolean

    Turns on or off CakePHP's conventional mode of applying layout files. On by default. Setting to off means that layouts will not be automatically applied to rendered views.

    true

    $cacheActionsource

    public mixed

    Used to define methods a controller that will be cached.

    See

    Controller::$cacheAction
    false

    $elementCachesource

    public string

    The Cache configuration View will use to store cached elements. Changing this will change the default configuration elements are stored under. You can also choose a cache config per element.

    See

    View::element()
    'default'

    $elementCacheSettingssource

    public array

    Element cache settings

    See

    View::_elementCache();
    View::_renderElement
    array()

    $extsource

    public string

    File extension. Defaults to CakePHP's template ".ctp".

    '.ctp'

    $hasRenderedsource

    public boolean

    True when the view has been rendered.

    false

    $helperssource

    public mixed

    An array of names of built-in helpers to include.

    array()

    $layoutsource

    public string

    Name of layout to use with this View.

    'default'

    $layoutPathsource

    public string

    Path to Layout.

    null

    $namesource

    public string

    Name of the controller.

    null

    $passedArgssource

    public mixed

    Current passed params

    array()

    $pluginsource

    public string

    Name of the plugin.

    Link

    http://manual.cakephp.org/chapter/plugins
    null

    $requestsource

    public CakeRequest

    An instance of a CakeRequest object that contains information about the current request. This object contains all the information about a request and several methods for reading additional information about the request.

    $responsesource

    public CakeResponse

    Reference to the Response object

    $subDirsource

    public string

    Sub-directory for this view file. This is often used for extension based routing. Eg. With an xml extension, $subDir would be xml/

    null

    $themesource

    public string

    Theme name.

    null

    $uuidssource

    public array

    List of generated DOM UUIDs.

    array()

    $validationErrorssource

    public array

    Holds current errors for the model validation.

    array()

    $viewsource

    public string

    Name of view to use with this View.

    null

    $viewPathsource

    public string

    Path to View.

    null

    $viewVarssource

    public array

    Variables for the view

    array()

    © 2005–2017 The Cake Software Foundation, Inc.
    Licensed under the MIT License.
    CakePHP is a registered trademark of Cake Software Foundation, Inc.
    We are not endorsed by or affiliated with CakePHP.
    https://api.cakephp.org/2.10/class-View.html