silverorange Code


Swat.SwatDetailsViewField
/Swat/SwatDetailsViewField.php at line 15

Class SwatDetailsViewField

SwatObject
└─SwatUIObject
└─SwatCellRendererContainer
└─SwatDetailsViewField

public class SwatDetailsViewField
extends SwatCellRendererContainer

A visible field in a SwatDetailsView

Copyright:
2005-2006 silverorange
License:
http://www.gnu.org/copyleft/lesser.html LGPL License 2.1

Field Summary
string

$id

The unique identifier of this field.

protected boolean

$odd

Whether or not this field is odd or even in its parent details view.

string

$title

The title of this field.

string

$title_content_type

Optional content type for the title.

SwatDetailsView

$view

The SwatDetailsView associated with this field.

boolean

$visible

Whether or not this field is displayed.

Fields inherited from Swat.SwatCellRendererContainer
renderers
Fields inherited from Swat.SwatUIObject
classes, html_head_entry_set, parent, visible
Constructor Summary

SwatDetailsViewField(string id)

Creates a new details view field.

Method Summary
void

display(mixed data, boolean odd)

Displays this details view field using a data object.

void

displayHeader()

Displays the header for this details view field.

protected void

displayRenderers(mixed data)

Renders each cell renderer in this details-view field.

void

displayValue(mixed data)

Displays the value of this details view field.

protected array

getBaseCSSClassNames()

Gets the base CSS class names of this details-view field.

protected array

getCSSClassNames()

Gets the array of CSS classes that are applied to this details-view field.

SwatHtmlHeadEntrySet

getHtmlHeadEntrySet()

Gets the SwatHtmlHeadEntry objects needed by this field.

array

getTdAttributes()

Gets the TD tag attributes for this column.

void

init()

Initializes this field.

void

process()

Methods inherited from Swat.SwatCellRendererContainer
addChild, addMappingToRenderer, addRenderer, copy, getDescendantStates, getDescendants, getFirstDescendant, getFirstRenderer, getHtmlHeadEntrySet, getRenderer, getRendererByPosition, getRendererInlineJavaScript, getRenderers, setDescendantStates
Methods inherited from Swat.SwatUIObject
addComment, addJavaScript, addStyleSheet, addTangoAttribution, copy, getCSSClassNames, getCSSClassString, getFirstAncestor, getHtmlHeadEntrySet, getInlineJavaScript, getUniqueId, isVisible

Field Detail

/Swat/SwatDetailsViewField.php at line 24

id

public string $id = null

The unique identifier of this field


/Swat/SwatDetailsViewField.php at line 66

odd

protected boolean $odd = false

Whether or not this field is odd or even in its parent details view


/Swat/SwatDetailsViewField.php at line 31

title

public string $title = ''

The title of this field


/Swat/SwatDetailsViewField.php at line 40

title_content_type

public string $title_content_type = 'text/plain'

Optional content type for the title

Default text/plain, use text/xml for XHTML fragments.


/Swat/SwatDetailsViewField.php at line 49

view

public SwatDetailsView $view = null

The SwatDetailsView associated with this field

Deprecated:
Use {@link SwatUIObject::$parent} instead.

/Swat/SwatDetailsViewField.php at line 56

visible

public boolean $visible = true

Whether or not this field is displayed


Constructor Detail

/Swat/SwatDetailsViewField.php at line 77

SwatDetailsViewField

public SwatDetailsViewField(string id)

Creates a new details view field

Parameters:
id - an optional unique ideitifier for this details view field.

Method Detail

/Swat/SwatDetailsViewField.php at line 117

display

public void display(mixed data, boolean odd)

Displays this details view field using a data object

Parameters:
data - a data object used to display the cell renderers in this field.
odd - whether this is an odd or even field so alternating style can be applied.

/Swat/SwatDetailsViewField.php at line 140

displayHeader

public void displayHeader()

Displays the header for this details view field


/Swat/SwatDetailsViewField.php at line 225

displayRenderers

protected void displayRenderers(mixed data)

Renders each cell renderer in this details-view field

Parameters:
data - the data object being used to render the cell renderers of this field.

/Swat/SwatDetailsViewField.php at line 161

displayValue

public void displayValue(mixed data)

Displays the value of this details view field

The properties of the cell renderers are set from the data object through the datafield property mappings.

Parameters:
data - the data object to display in this field.

/Swat/SwatDetailsViewField.php at line 313

getBaseCSSClassNames

protected array getBaseCSSClassNames()

Gets the base CSS class names of this details-view field

This is the recommended place for field subclasses to add extra hard- coded CSS classes.

Returns:
the array of base CSS class names for this details-view field.

/Swat/SwatDetailsViewField.php at line 268

getCSSClassNames

protected array getCSSClassNames()

Gets the array of CSS classes that are applied to this details-view field

CSS classes are added to this field in the following order:

  1. hard-coded CSS classes from field subclasses,
  2. 'odd' if this is an odd row in the parent view,
  3. user-specified CSS classes on this field,
  4. the inheritance classes of the first cell renderer in this field,
  5. hard-coded CSS classes from the first cell renderer in this field,
  6. hard-coded data-specific CSS classes from the first cell renderer in this field if this field has data mappings applied,
  7. user-specified CSS classes on the first cell renderer in this field.

Returns:
the array of CSS classes that are applied to this details-view field.
See Also:
SwatCellRenderer::getInheritanceCSSClassNames()
SwatCellRenderer::getBaseCSSClassNames()
SwatUIObject::getCSSClassNames()

/Swat/SwatDetailsViewField.php at line 206

getHtmlHeadEntrySet

public SwatHtmlHeadEntrySet getHtmlHeadEntrySet()

Gets the SwatHtmlHeadEntry objects needed by this field

Returns:
the SwatHtmlHeadEntry objects needed by this details-view field.
See Also:
SwatUIObject::getHtmlHeadEntrySet()

/Swat/SwatDetailsViewField.php at line 188

getTdAttributes

public array getTdAttributes()

Gets the TD tag attributes for this column

The returned array is of the form 'attribute' => value.

Returns:
an array of attributes to apply to this column's TD tag.

/Swat/SwatDetailsViewField.php at line 91

init

public void init()

Initializes this field

This calls init on all renderers in this field.


/Swat/SwatDetailsViewField.php at line 100

process

public void process()

silverorange Code