com.lokorin.dfcrafters.lib
[ class tree: com.lokorin.dfcrafters.lib ] [ index: com.lokorin.dfcrafters.lib ] [ all elements ]

Class: UpdateType

Source Location: /_includes/lib_updates.php

Class Overview

TableEntry
   |
   --UpdateType

Describes an update type. An update type is a group that updates are grouped into. The type decides how updates of its type should be displayed.


Author(s):

  • Andreas Launila

Variables

Methods


Inherited Variables

Inherited Methods

Class: TableEntry

TableEntry::__construct()
Constructor for TableEntry.
TableEntry::getId()
Gets the unique identifier for the table entry.
TableEntry::readRow()
Processes the contents of a retrieved row that describes the entry.

Class Details

[line 363]
Describes an update type. An update type is a group that updates are grouped into. The type decides how updates of its type should be displayed.



Tags:

author:  Andreas Launila


[ Top ]


Class Variables

$description =

[line 381]

A short description of what updates are grouped in the type. For example 'News added'.



Tags:

access:  private

Type:   string


[ Top ]

$displayField =

[line 421]

The field in $tableToListenTo that contains the value to use as display text for resulting updates.



Tags:

access:  private

Type:   string


[ Top ]

$displayFormat =

[line 396]

The format that should be used with printf when describing an individual update of this type. For example '%s' if one wants the update's text to be displayed along, or 'Added: %s' if one instead wants to display 'Added: ' in front.



Tags:

access:  private

Type:   string


[ Top ]

$formatMultiple =

[line 375]

The format that should be used with printf when describing a grouping which contains more than one update.



Tags:

access:  private

Type:   string


[ Top ]

$formatSingle =

[line 369]

The format that should be used with printf when describing a grouping which contains less than two updates.



Tags:

access:  private

Type:   string


[ Top ]

$linkFormat =

[line 388]

The format that should be used with printf when creating a link to an update that is grouped in this type. The link should assume that it starts in the root path.



Tags:

access:  private

Type:   string


[ Top ]

$linkIdField =

[line 415]

The field in $tableToListenTo that contains the value to use as link id for resulting updates.



Tags:

access:  private

Type:   string


[ Top ]

$moduleToListenTo =

[line 409]

The name of the admin module class that the type is listening to. The type triggers on changes made by this module in conjunction with $tableToListenTo.



Tags:

access:  private

Type:   string


[ Top ]

$tableToListenTo =

[line 402]

The name of the table that the type is listening to. The type triggers on changes to this table in conjunction with $moduleToListenTo.



Tags:

access:  private

Type:   string


[ Top ]



Class Methods


constructor __construct [line 428]

UpdateType __construct( integer $id)

Constructor for UpdateType.



Tags:

access:  public


Overrides TableEntry::__construct() (Constructor for TableEntry.)

Parameters:

integer   $id   The unique identifier for the update type that should be constructed.

[ Top ]

method getDescription [line 490]

string getDescription( )

Gets a description of what updates are grouped in the type. For example 'News added'.



Tags:

return:  A description.
access:  public


[ Top ]

method getLink [line 480]

string getLink( mixed $linkId, string $displayText)

Formats specified information into a XHTML link in accordance with the update type's specifications.



Tags:

return:  An XHTML compliant link.
access:  public


Parameters:

mixed   $linkId   The identifier that should be used when constructing the destination of the link.
string   $displayText   The text that should be used when constructing the displayed text representing the link.

[ Top ]

method getUpdateGroupsDescription [line 458]

string getUpdateGroupsDescription( array $updates)

Gets an description for the specified group of updates as defined by the update type. This can for instance be '4 items added'.



Tags:

return:  A description.
access:  public


Parameters:

array   $updates   The update instances that the description should be created for.

[ Top ]

method notifyOfAdminActivity [line 505]

void notifyOfAdminActivity( string $table, string $module, integer $id)

Notifies the update types that there has been administrative activity.

This allows the update type to catch table/module combinations that it is listening to and take the appropriate action.




Tags:

access:  public


Parameters:

string   $table   The name of the table that the activity was performed on.
string   $module   The class name of the module that performed the activity.
integer   $id   The identifier for the row that the activity affected.

[ Top ]

method readRow [line 439]

void readRow( mixed $row)



Tags:

access:  public
see:  com.lokorin.dfcrafters.includes.TableEntry($row)


Overrides TableEntry::readRow() (Processes the contents of a retrieved row that describes the entry.)

[ Top ]


Documentation generated on Tue, 10 Jan 2006 17:06:38 +0100 by phpDocumentor 1.3.0RC4