Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
Asset_Attribute_DateTime Class Reference
Inheritance diagram for Asset_Attribute_DateTime:
Asset_Attribute MySource_Object

Public Member Functions

 Asset_Attribute_DateTime ($attributeid=0, $value=NULL)
 
 setEditParams (&$node)
 
 paint ($prefix, $read_only=FALSE)
 
 process ($prefix)
 
 getTimestamp ()
 
 getISO8601 ()
 
 validateValue (&$value)
 
 _getPeriodOptions ()
 
 _getAgeOptions ()
 
 _getTodayAgeOptions ()
 
 getKeywordValue ($format='')
 
- Public Member Functions inherited from Asset_Attribute
 Asset_Attribute ($attributeid=0, $value=NULL, $default_params=Array())
 
loadAttribute ($attributeid=0, $value=NULL, $default_params=Array())
 
 type ()
 
 paint ($prefix, $read_only=FALSE)
 
 paintEditParams ($prefix, $write_access=FALSE)
 
 processEditParams ($prefix)
 
 process ($prefix)
 
 validateValue (&$value)
 
 setValue (&$value)
 
 setEditParams (&$node)
 
 setEditParam ($field, $value)
 
 setParam ($field, $value)
 
 getContent ()
 
 getKeywordValue ($format='')
 
 exportToXML ()
 
 exportContentsToXML ()
 
- Public Member Functions inherited from MySource_Object
 MySource_Object ()
 
 __sleep ()
 
 __wakeup ()
 

Protected Member Functions

 _getDateOptionEditInterface ($prefix, $option_name, $default_date=NULL, $default_period=NULL, $circa=NULL)
 

Additional Inherited Members

- Data Fields inherited from Asset_Attribute
 $id = 0
 
 $name = ''
 
 $uniq = FALSE
 
 $description = ''
 
 $_params = Array()
 
 $_default_value = NULL
 
 $_edit_params = Array()
 
 $value = NULL
 
 $processed = FALSE
 
 $is_admin = FALSE
 

Detailed Description

Definition at line 72 of file datetime.inc.

Member Function Documentation

_getAgeOptions ( )

Return valid period age options for the datetime field

Returns
array private

Definition at line 716 of file datetime.inc.

_getDateOptionEditInterface (   $prefix,
  $option_name,
  $default_date = NULL,
  $default_period = NULL,
  $circa = NULL 
)
protected

Returns the edit interface for each date option type

Parameters
string$prefixPrefix for form elements
string$option_nameDate option type to paint
string$default_dateDefault fixed date
string$default_periodDefault date period setting
boolean$circaNULL = circa not allowed, otherwise TRUE/FALSE depending on circa setting
Returns
string

Definition at line 780 of file datetime.inc.

_getPeriodOptions ( )

Return valid period type options for the datetime field

Returns
array private

Definition at line 696 of file datetime.inc.

_getTodayAgeOptions ( )

Return valid "Today" period age options

Returns
array private

Definition at line 732 of file datetime.inc.

Asset_Attribute_DateTime (   $attributeid = 0,
  $value = NULL 
)

Constructor

Parameters
int$attributeidthe attribute id to be loaded
mixed$valuethe current value for the element

Definition at line 83 of file datetime.inc.

getISO8601 ( )

Get the current value as an ISO8601 formatted date

Returns
string public

Definition at line 623 of file datetime.inc.

getKeywordValue (   $format = '')

Returns the content of this attribute as it should be shown in a keyword replacement

Parameters
string$formatFormat suffix
Returns
void public

Definition at line 750 of file datetime.inc.

getTimestamp ( )

Get the current value as a unix timestamp

Returns
int public

Definition at line 545 of file datetime.inc.

paint (   $prefix,
  $read_only = FALSE 
)

Prints the interface for filling in a value

Parameters
string$prefixprefix for the form element
boolean$read_onlyare we just printing the value
Returns
void public

Definition at line 197 of file datetime.inc.

process (   $prefix)

Processes the interface for filling in a value

Parameters
string$prefixprefix for the form element
Returns
void public

Definition at line 420 of file datetime.inc.

setEditParams ( $node)

Takes an XML_Tree_Node from an edit interface XML file and creates the params array from it

Parameters
object&$nodeXML_Tree_Node object.
Returns
boolean public

Definition at line 129 of file datetime.inc.

validateValue ( $value)

Ensure the attribute being set is a valid date/time

Parameters
mixed&$valuevalue to be validated
Returns
boolean public

Definition at line 645 of file datetime.inc.


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