Perforce Chronicle 2012.2/486814
API Documentation

P4Cms_Form_Decorator_Value Class Reference

Simply renders the value of an element. More...

List of all members.

Public Member Functions

 render ($content)
 Return the value of the element for display.

Detailed Description

Simply renders the value of an element.

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

Member Function Documentation

P4Cms_Form_Decorator_Value::render ( content)

Return the value of the element for display.

Default behavior is to replace existing content, but placement can be set to append or prepend instead.

Parameters:
string$contentThe content to render.
Returns:
string
    {
        switch ($this->getPlacement()) {
            case self::APPEND:
                return $content . $this->getElement()->getValue();
            case self::PREPEND:
                return $this->getElement()->getValue() . $content;
            default:
                return $this->getElement()->getValue();
        }
    }

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