Squiz Matrix
4.12.2
|
Public Member Functions | |
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 () | |
Data Fields | |
$id = 0 | |
$name = '' | |
$uniq = FALSE | |
$description = '' | |
$_params = Array() | |
$_default_value = NULL | |
$_edit_params = Array() | |
$value = NULL | |
$processed = FALSE | |
$is_admin = FALSE | |
Data Fields inherited from MySource_Object | |
$_tmp | |
Definition at line 28 of file asset_attribute.inc.
Asset_Attribute | ( | $attributeid = 0 , |
|
$value = NULL , |
|||
$default_params = Array() |
|||
) |
Constructor
int | $attributeid | the attribute id to be loaded |
mixed | $value | the current value for the element |
array | $default_params | the default values for the params |
Definition at line 100 of file asset_attribute.inc.
exportContentsToXML | ( | ) |
Returns a representation of this asset's parameters, edit parameters and value as XML
This function will be overridden by children who do not use getContent to get their value
Definition at line 455 of file asset_attribute.inc.
exportToXML | ( | ) |
Returns a representation of this asset in XML
Definition at line 423 of file asset_attribute.inc.
getContent | ( | ) |
Returns the raw content of this attribute type
Definition at line 394 of file asset_attribute.inc.
getKeywordValue | ( | $format = '' | ) |
Returns the content of this attribute as it should be shown in a keyword replacement
string | $format | Format suffix |
Definition at line 409 of file asset_attribute.inc.
& loadAttribute | ( | $attributeid = 0 , |
|
$value = NULL , |
|||
$default_params = Array() |
|||
) |
Retrieves subclasses of Asset_Attribute, static method
int | $attributeid | the attribute id to be loaded |
mixed | $value | the current value for the element |
array | $default_params | the default values for the params |
Definition at line 169 of file asset_attribute.inc.
paint | ( | $prefix, | |
$read_only = FALSE |
|||
) |
Prints the interface for filling in a value
string | $prefix | prefix for the form element |
boolean | $read_only | are we just printing the value |
Definition at line 221 of file asset_attribute.inc.
paintEditParams | ( | $prefix, | |
$write_access = FALSE |
|||
) |
Print the interface for changing some params
Attributes must override this function
string | $prefix | prefix for the form element |
boolean | $write_access | write access |
Definition at line 239 of file asset_attribute.inc.
process | ( | $prefix | ) |
Prints the interface for filling in a value
string | $prefix | prefix for the form element |
Definition at line 271 of file asset_attribute.inc.
processEditParams | ( | $prefix | ) |
Process the interface for changing some params
Attributes must override this function
string | $prefix | prefix for the form element |
Definition at line 256 of file asset_attribute.inc.
setEditParam | ( | $field, | |
$value | |||
) |
Manually set the value of an edit parameter for this attribute
The parameter must already contain a default value to be set with this function It returns TRUE if parameter set successfully
string | $field | The parameter field to set |
mixed | $value | The value to set it to |
Definition at line 350 of file asset_attribute.inc.
setEditParams | ( | & | $node | ) |
Takes an XML_Tree_Node from an edit interface XML file and creates the params array from it
object | &$node | SimpleXMLElement |
Definition at line 326 of file asset_attribute.inc.
setParam | ( | $field, | |
$value | |||
) |
Manually set the value of an parameter for this attribute
The parameter must already contain a default value to be set with this function It returns TRUE if parameter set successfully
string | $field | The parameter field to set |
mixed | $value | The value to set it to |
Definition at line 375 of file asset_attribute.inc.
setValue | ( | & | $value | ) |
Sets the value of this attribute after validating
mixed | &$value | value to be validated |
Definition at line 305 of file asset_attribute.inc.
type | ( | ) |
Returns the type of this attribute
Definition at line 203 of file asset_attribute.inc.
validateValue | ( | & | $value | ) |
Validate the value of this attribute - children should overwrite
This function should return FALSE if the passed-in value is irreparably invalid. If the value is only trivially invalid this function may tweak it to make it valid, but it is NOT the job of this function to change an invalid value to this attribute's default value.
mixed | &$value | value to be validated |
Definition at line 290 of file asset_attribute.inc.