Perforce Chronicle 2012.2/486814
API Documentation

P4Cms_Content_EnhancedElementInterface Interface Reference

Provides a contract for form elements to be enhanced for use with content records: More...

Inheritance diagram for P4Cms_Content_EnhancedElementInterface:
Content_Form_Element_ContentSelect Content_Form_Element_File Content_Form_Element_ImageSelect Content_Form_Element_ImageSelect Content_Form_Element_ImageFile

List of all members.

Public Member Functions

 getContentRecord ()
 Get the associated content record (if set).
 getDefaultDisplayDecorators ()
 Get the default decorators to use when rendering content element values of this type for display.
 setContentRecord ($content)
 Set the associated content record for this element.

Detailed Description

Provides a contract for form elements to be enhanced for use with content records:

  • Specifies methods to associate an element with a content record. This is useful when rendering "display" decorators for an element as it allows decorators to access the content record and pull out other information (e.g. a download link when decorating a file element).
  • Specifies method to provide default decorators to use when rendering content values for display. Not to be confused with standard form element decorators which render form inputs.
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_Content_EnhancedElementInterface::getContentRecord ( )

Get the associated content record (if set).

Returns:
null|P4Cms_Content the associated content record or null if none set.

Implemented in Content_Form_Element_ContentSelect, and Content_Form_Element_File.

P4Cms_Content_EnhancedElementInterface::getDefaultDisplayDecorators ( )

Get the default decorators to use when rendering content element values of this type for display.

Returns:
array decorators configuration array suitable for passing to element setDecorators().

Implemented in Content_Form_Element_ContentSelect, Content_Form_Element_File, Content_Form_Element_ImageFile, and Content_Form_Element_ImageSelect.

P4Cms_Content_EnhancedElementInterface::setContentRecord ( content)

Set the associated content record for this element.

Parameters:
P4Cms_Content$contentthe associated content record for this element.

Implemented in Content_Form_Element_ContentSelect, and Content_Form_Element_File.


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