Perforce Chronicle 2012.2/486814
API Documentation

System_Model_Info Class Reference

Implements collection of system information for display. More...

Inheritance diagram for System_Model_Info:
P4Cms_Model P4Cms_ModelInterface

List of all members.

Public Member Functions

 __construct ($values=null)
 Set the default view, then call parent as PHP does not let you reference constants while declaring class member variables.
 render ($view)
 Allows specific view scripts for different types of information by setting the view script path and name off of the provided (or default) view script for the object.

Static Protected Attributes

static $_fields

Detailed Description

Implements collection of system information for display.

Copyright:
2011-2012 Perforce Software. All rights reserved
License:
Please see LICENSE.txt in top-level folder of this distribution.
Version:
2012.2/486814

Constructor & Destructor Documentation

System_Model_Info::__construct ( values = null)

Set the default view, then call parent as PHP does not let you reference constants while declaring class member variables.

Parameters:
array$valuesValues to set for this model.

Reimplemented from P4Cms_Model.

    {
        static::$_fields['view'] = array(
            'default' => APPLICATION_PATH . '/system/views/scripts/default-info.phtml'
        );

        parent::__construct($values);
    }

Member Function Documentation

System_Model_Info::render ( view)

Allows specific view scripts for different types of information by setting the view script path and name off of the provided (or default) view script for the object.

Parameters:
string$viewThe view to render for this model.
Returns:
string The rendered view.
    {
        $view = clone $view;

        $view->setScriptPath(dirname($this->getValue('view')));
        $view->content = $this->getValue('content');

        return $view->render(basename($this->getValue('view')));
    }

Member Data Documentation

System_Model_Info::$_fields [static, protected]
Initial value:
 array(
        'title',
        'content',
        'order'
    )

Reimplemented from P4Cms_Model.


The documentation for this class was generated from the following file: