Public Member Functions | |
__construct ($constraints=null, $multi=false) | |
Constructs new SDRProjectField object. | |
getParentField () | |
Retrieves parent object of this object. | |
getParentFieldMulti ($depth=1) | |
Retrieves parent object of this object with foreign objects. | |
getParentProject () | |
Retrieves parent object of this object. | |
getParentProjectMulti ($depth=1) | |
Retrieves parent object of this object with foreign objects. | |
Static Public Member Functions | |
static | exists ($constraints=array()) |
Checks to see if object exists according to constraints. | |
static | existsMulti ($constraints=array()) |
Checks to see if object-set exists according to constraints. | |
static | findOrAddProjectField ($fieldId, $projectId) |
Retrieve a ProjectField field by a given name and project, or create and return if it does not exist. | |
static | getAttributesStatic () |
Retrieves attributes and information about them. | |
static | getList ($constraints=array(), $limit=array(), $order=array(), $count=false) |
Retrieves list of SDRProjectField objects. | |
static | getListMulti ($constraints=array(), $limit=array(), $order=array(), $count=false, $depth=1) |
Retrieves list of SDRProjectField objects using joins. | |
static | getTableNameStatic () |
Retrieves name of table represented by this class. | |
static | retrieve ($constraints=array(), $checkOnly=false) |
Retrieves a single object of this type, given the constraints. | |
static | retrieveMulti ($constraints=array(), $checkOnly=false, $depth=1) |
Retrieves a single object of this type, given the constraints, grabbing foreign objects. | |
Static Public Attributes | |
static | $ATTRIBUTES |
Attributes for this entity and information about them. |
The fields associated with a project will show up in editing forms when users wish to submit new metadata to that project. A project may want some commonly used fields (i.e., Type), but it may also have some of its own fields (i.e., InterActivityType). All of these fields will be bound to the project by the SDRProjectField mappings.
SDRProjectField::__construct | ( | $ | constraints = null , |
|
$ | multi = false | |||
) |
Constructs new SDRProjectField object.
This method will only populate the object if a constraints array is passed in, to use for selecting the information for the object from the database (see Guide to Database Constraints).
$constraints | [array]: constraints array for populating | |
$multi | [boolean]: if true, use joins when populating |
static SDRProjectField::exists | ( | $ | constraints = array() |
) | [static] |
Checks to see if object exists according to constraints.
This is simply an alias for retrieve($constraints, true);
$constraints | [array]: constraints used to check for existence of object |
static SDRProjectField::existsMulti | ( | $ | constraints = array() |
) | [static] |
Checks to see if object-set exists according to constraints.
This is simply an alias for retrieveMulti($constraints, true);
$constraints | [array]: constraints used to check for existence of object |
static SDRProjectField::findOrAddProjectField | ( | $ | fieldId, | |
$ | projectId | |||
) | [static] |
Retrieve a ProjectField field by a given name and project, or create and return if it does not exist.
$name | [string]: The name of the field | |
$project | [string]: The type of the project |
static SDRProjectField::getAttributesStatic | ( | ) | [static] |
Retrieves attributes and information about them.
This method is needed because there is no generic way to get at the $ATTRIBUTES static member variable without this kind of method. If you do not need to generically grab the attributes of a model class, just use ModelClass::$ATTRIBUTES
or $obj->getAttributes()
.
static SDRProjectField::getList | ( | $ | constraints = array() , |
|
$ | limit = array() , |
|||
$ | order = array() , |
|||
$ | count = false | |||
) | [static] |
Retrieves list of SDRProjectField objects.
See Guide to Database Constraints for more on how to construct constraint and other arrays for this method.
$constraints | [array]: limit results by criteria | |
$limit | [array]: limit results by count | |
$order | [array]: change ordering of results | |
$count | [boolean]: if true, return the number of objects that would have been returned, rather than the objects themselves |
static SDRProjectField::getListMulti | ( | $ | constraints = array() , |
|
$ | limit = array() , |
|||
$ | order = array() , |
|||
$ | count = false , |
|||
$ | depth = 1 | |||
) | [static] |
Retrieves list of SDRProjectField objects using joins.
See Guide to Database Constraints for more on how to construct constraint and other arrays for this method. This method differs from getList() in that it initializes the objects with joins, so that their child objects are included as well. Everything else is the same
$constraints | [array]: limit results by criteria | |
$limit | [array]: limit results by count | |
$order | [array]: change ordering of results | |
$count | [boolean]: if true, return the number of objects that would have been returned, rather than the objects themselves | |
$depth | [int]: how deep to traverse dependencies when doing joins |
SDRProjectField::getParentField | ( | ) |
Retrieves parent object of this object.
The parent object of a SDRProjectField is a SDRField, related by the fact that SDRField's id has the same value as our fieldId field.
SDRProjectField::getParentFieldMulti | ( | $ | depth = 1 |
) |
Retrieves parent object of this object with foreign objects.
The parent object of a SDRProjectField is a SDRField, related by the fact that SDRField's id has the same value as our fieldId field.
$depth | [int]: how deep to traverse dependencies when doing joins |
SDRProjectField::getParentProject | ( | ) |
Retrieves parent object of this object.
The parent object of a SDRProjectField is a SDRProject, related by the fact that SDRProject's id has the same value as our projectId field.
SDRProjectField::getParentProjectMulti | ( | $ | depth = 1 |
) |
Retrieves parent object of this object with foreign objects.
The parent object of a SDRProjectField is a SDRProject, related by the fact that SDRProject's id has the same value as our projectId field.
$depth | [int]: how deep to traverse dependencies when doing joins |
static SDRProjectField::getTableNameStatic | ( | ) | [static] |
Retrieves name of table represented by this class.
static SDRProjectField::retrieve | ( | $ | constraints = array() , |
|
$ | checkOnly = false | |||
) | [static] |
Retrieves a single object of this type, given the constraints.
Use this method instead of the constructor since the constructor cannot return error conditions properly.
$constraints | [array]: constraints to use when retrieving object | |
$checkOnly | [boolean]: if true, just return whether the row exists in the DB |
static SDRProjectField::retrieveMulti | ( | $ | constraints = array() , |
|
$ | checkOnly = false , |
|||
$ | depth = 1 | |||
) | [static] |
Retrieves a single object of this type, given the constraints, grabbing foreign objects.
Use this method instead of the constructor since the constructor cannot return error conditions properly. This method uses getListMulti() instead of getList() to grab the object.
$constraints | [array]: constraints to use when retrieving object | |
$checkOnly | [boolean]: if true, just return whether the row exists in the DB | |
$depth | [int]: how deep to traverse dependencies when doing joins |