Public Member Functions | |
| Resource ($ResourceId=NULL) | |
| Object constructor. | |
| Delete () | |
| Remove resource (and accompanying associations) from database. | |
| Status () | |
| Retrieve result of last operation if available. | |
| Id () | |
| Retrieve numerical resource ID. | |
| IsTempResource ($NewSetting=NULL) | |
| Get/set whether resource is a temporary record. | |
| Get ($FieldNameOrObject, $ReturnObject=FALSE, $IncludeVariants=FALSE) | |
| Retrieve value using field name or field object. | |
| GetByField ($FieldNameOrObject, $ReturnObject=FALSE, $IncludeVariants=FALSE) | |
| Old method for retrieving values, deprecated in favor of Get(). | |
| GetByFieldId ($FieldId, $ReturnObject=FALSE, $IncludeVariants=FALSE) | |
| Retrieve value using field ID. | |
| GetAsArray ($IncludeDisabledFields=FALSE, $ReturnObjects=TRUE) | |
| GetQualifier ($FieldName, $ReturnObject=TRUE) | |
| Retrieve qualifier by field name. | |
| GetQualifierByFieldId ($FieldId, $ReturnObject=TRUE) | |
| Retrieve qualifier by field ID. | |
| GetQualifierByField ($Field, $ReturnObject=TRUE) | |
| Retrieve qualifier by Field object. | |
| Set ($FieldNameOrObject, $NewValue) | |
| SetByField ($Field, $NewValue) | |
| SetByFieldId ($FieldId, $NewValue) | |
| SetQualifier ($FieldName, $NewValue) | |
| SetQualifierByFieldId ($FieldId, $NewValue) | |
| SetQualifierByField ($Field, $NewValue) | |
| Clear ($FieldName, $ValueToClear=NULL) | |
| ClearByFieldId ($FieldId, $ValueToClear=NULL) | |
| ClearByField ($Field, $ValueToClear=NULL) | |
| Classifications () | |
| CumulativeRating () | |
| ScaledCumulativeRating () | |
| NumberOfRatings () | |
| Rating ($NewRating=NULL, $UserId=NULL) | |
| Comments () | |
| NumberOfComments () | |
| UserCanEdit ($User) | |
| UserCanViewField ($User, $FieldOrFieldName) | |
| UserCanEditField ($User, $FieldOrFieldName) | |
Definition at line 16 of file Resource.php.
| Resource::Classifications | ( | ) |
Definition at line 1236 of file Resource.php.
References Id().
Referenced by Delete().

| Resource::Clear | ( | $ | FieldName, | |
| $ | ValueToClear = NULL | |||
| ) |
| Resource::ClearByField | ( | $ | Field, | |
| $ | ValueToClear = NULL | |||
| ) |
Definition at line 1049 of file Resource.php.
References Get(), Id(), MetadataSchema::MDFTYPE_CONTROLLEDNAME, MetadataSchema::MDFTYPE_DATE, MetadataSchema::MDFTYPE_FILE, MetadataSchema::MDFTYPE_FLAG, MetadataSchema::MDFTYPE_IMAGE, MetadataSchema::MDFTYPE_NUMBER, MetadataSchema::MDFTYPE_OPTION, MetadataSchema::MDFTYPE_PARAGRAPH, MetadataSchema::MDFTYPE_POINT, MetadataSchema::MDFTYPE_TEXT, MetadataSchema::MDFTYPE_TIMESTAMP, MetadataSchema::MDFTYPE_TREE, MetadataSchema::MDFTYPE_URL, and MetadataSchema::MDFTYPE_USER.
Referenced by Clear(), and ClearByFieldId().

| Resource::ClearByFieldId | ( | $ | FieldId, | |
| $ | ValueToClear = NULL | |||
| ) |
| Resource::Comments | ( | ) |
| Resource::CumulativeRating | ( | ) |
Definition at line 1265 of file Resource.php.
Referenced by GetAsArray(), NumberOfRatings(), Resource(), and ScaledCumulativeRating().

| Resource::Delete | ( | ) |
Remove resource (and accompanying associations) from database.
Definition at line 104 of file Resource.php.
References Classifications(), Id(), and MetadataSchema::MDFTYPE_IMAGE.
| Resource::Get | ( | $ | FieldNameOrObject, | |
| $ | ReturnObject = FALSE, |
|||
| $ | IncludeVariants = FALSE | |||
| ) |
Retrieve value using field name or field object.
| FieldNameOrObject | Full name of field or a Field object. | |
| ReturnObject | For field types that can return multiple values, if TRUE, returns array of objects, else returns array of values. Defaults to FALSE. | |
| IncludeVariants | If TRUE, includes variants in return value. Only applicable for ControlledName fields. |
Definition at line 252 of file Resource.php.
References Id(), MetadataSchema::MDFTYPE_CONTROLLEDNAME, MetadataSchema::MDFTYPE_DATE, MetadataSchema::MDFTYPE_FILE, MetadataSchema::MDFTYPE_FLAG, MetadataSchema::MDFTYPE_IMAGE, MetadataSchema::MDFTYPE_NUMBER, MetadataSchema::MDFTYPE_OPTION, MetadataSchema::MDFTYPE_PARAGRAPH, MetadataSchema::MDFTYPE_POINT, MetadataSchema::MDFTYPE_TEXT, MetadataSchema::MDFTYPE_TIMESTAMP, MetadataSchema::MDFTYPE_TREE, MetadataSchema::MDFTYPE_URL, and MetadataSchema::MDFTYPE_USER.
Referenced by ClearByField(), GetAsArray(), GetByField(), GetByFieldId(), GetQualifierByField(), and UserCanEditField().

| Resource::GetAsArray | ( | $ | IncludeDisabledFields = FALSE, |
|
| $ | ReturnObjects = TRUE | |||
| ) |
Definition at line 486 of file Resource.php.
References CumulativeRating(), Get(), GetQualifierByField(), and Id().
| Resource::GetByField | ( | $ | FieldNameOrObject, | |
| $ | ReturnObject = FALSE, |
|||
| $ | IncludeVariants = FALSE | |||
| ) |
Old method for retrieving values, deprecated in favor of Get().
Definition at line 467 of file Resource.php.
References Get().
| Resource::GetByFieldId | ( | $ | FieldId, | |
| $ | ReturnObject = FALSE, |
|||
| $ | IncludeVariants = FALSE | |||
| ) |
Retrieve value using field ID.
| FieldId | ID of field. | |
| ReturnObject | For field types that can return multiple values, if TRUE, returns array of objects, else returns array of values. Defaults to FALSE. | |
| IncludeVariants | If TRUE, includes variants in return value. Only applicable for ControlledName fields. |
Definition at line 479 of file Resource.php.
References Get().
| Resource::GetQualifier | ( | $ | FieldName, | |
| $ | ReturnObject = TRUE | |||
| ) |
Retrieve qualifier by field name.
| FieldName | Full name of field. | |
| ReturnObject | If TRUE, return Qualifier objects, else return qualifier IDs. Defaults to TRUE. |
Definition at line 524 of file Resource.php.
References GetQualifierByField().
| Resource::GetQualifierByField | ( | $ | Field, | |
| $ | ReturnObject = TRUE | |||
| ) |
Retrieve qualifier by Field object.
| Field | Field object. | |
| ReturnObject | If TRUE, return Qualifier objects, else return qualifier IDs. Defaults to TRUE. |
Definition at line 548 of file Resource.php.
References $Items, Get(), MetadataSchema::MDFTYPE_CONTROLLEDNAME, MetadataSchema::MDFTYPE_OPTION, and MetadataSchema::MDFTYPE_TREE.
Referenced by GetAsArray(), GetQualifier(), and GetQualifierByFieldId().

| Resource::GetQualifierByFieldId | ( | $ | FieldId, | |
| $ | ReturnObject = TRUE | |||
| ) |
Retrieve qualifier by field ID.
| FieldId | ID of field. | |
| ReturnObject | If TRUE, return Qualifier objects, else return qualifier IDs. Defaults to TRUE. |
Definition at line 536 of file Resource.php.
References GetQualifierByField().
| Resource::Id | ( | ) |
Retrieve numerical resource ID.
Definition at line 187 of file Resource.php.
Referenced by Classifications(), ClearByField(), Comments(), Delete(), Get(), GetAsArray(), IsTempResource(), NumberOfComments(), NumberOfRatings(), Rating(), Resource(), and Set().

| Resource::IsTempResource | ( | $ | NewSetting = NULL |
) |
Get/set whether resource is a temporary record.
| NewSetting | TRUE/FALSE setting for whether resource is temporary. (OPTIONAL) |
Definition at line 194 of file Resource.php.
References Id().
| Resource::NumberOfComments | ( | ) |
| Resource::NumberOfRatings | ( | ) |
| Resource::Rating | ( | $ | NewRating = NULL, |
|
| $ | UserId = NULL | |||
| ) |
| Resource::Resource | ( | $ | ResourceId = NULL |
) |
Object constructor.
| ResourceId | ID of resource to load. New resource is created if no ID is supplied. |
Definition at line 25 of file Resource.php.
References CumulativeRating(), Id(), MetadataSchema::MDFTYPE_FLAG, MetadataSchema::MDFTYPE_NUMBER, MetadataSchema::MDFTYPE_OPTION, MetadataSchema::MDFTYPE_POINT, and SetByField().
| Resource::ScaledCumulativeRating | ( | ) |
| Resource::Set | ( | $ | FieldNameOrObject, | |
| $ | NewValue | |||
| ) |
Definition at line 673 of file Resource.php.
References Classification::CLASSSTAT_OK, Id(), MetadataSchema::MDFTYPE_CONTROLLEDNAME, MetadataSchema::MDFTYPE_DATE, MetadataSchema::MDFTYPE_FILE, MetadataSchema::MDFTYPE_FLAG, MetadataSchema::MDFTYPE_IMAGE, MetadataSchema::MDFTYPE_NUMBER, MetadataSchema::MDFTYPE_OPTION, MetadataSchema::MDFTYPE_PARAGRAPH, MetadataSchema::MDFTYPE_POINT, MetadataSchema::MDFTYPE_TEXT, MetadataSchema::MDFTYPE_TIMESTAMP, MetadataSchema::MDFTYPE_TREE, MetadataSchema::MDFTYPE_URL, and MetadataSchema::MDFTYPE_USER.
Referenced by SetByField(), and SetByFieldId().

| Resource::SetByField | ( | $ | Field, | |
| $ | NewValue | |||
| ) |
Definition at line 982 of file Resource.php.
References Set().
Referenced by Resource().

| Resource::SetByFieldId | ( | $ | FieldId, | |
| $ | NewValue | |||
| ) |
| Resource::SetQualifier | ( | $ | FieldName, | |
| $ | NewValue | |||
| ) |
| Resource::SetQualifierByField | ( | $ | Field, | |
| $ | NewValue | |||
| ) |
Definition at line 1006 of file Resource.php.
Referenced by SetQualifier(), and SetQualifierByFieldId().

| Resource::SetQualifierByFieldId | ( | $ | FieldId, | |
| $ | NewValue | |||
| ) |
| Resource::Status | ( | ) |
Retrieve result of last operation if available.
Definition at line 181 of file Resource.php.
| Resource::UserCanEdit | ( | $ | User | ) |
Definition at line 1429 of file Resource.php.
| Resource::UserCanEditField | ( | $ | User, | |
| $ | FieldOrFieldName | |||
| ) |
Definition at line 1461 of file Resource.php.
References Get().
Referenced by UserCanViewField().

| Resource::UserCanViewField | ( | $ | User, | |
| $ | FieldOrFieldName | |||
| ) |