dmCollection Class Reference

Inheritance diagram for dmCollection:
dmModel idmViewDefinition

Public Member Functions

Static Public Member Functions


Detailed Description

Definition at line 17 of file dmCollection.class.php.


Constructor & Destructor Documentation

dmCollection::__construct ( alias  ) 

To instantiate a generic collection, supply an alias with value of /dmdefault.

Using dmCollection::instantiate() is preferred as it will maintain an optimized pool of dmCollections.

Parameters:
alias 
Exceptions:
dmUnavailableCollectionException 
Since:
0.1

Definition at line 143 of file dmCollection.class.php.


Member Function Documentation

dmCollection::__toString (  ) 

The return value of this method may change and should not be depended on.

Returns:
The collection alias
Since:
0.1

Definition at line 153 of file dmCollection.class.php.

static dmCollection::exists ( alias  )  [static, final]
Parameters:
string alias
Since:
0.4

Definition at line 126 of file dmCollection.class.php.

dmCollection::getAlias (  )  [final]
static dmCollection::getAllInScope (  )  [static, final]

Returns all currently instantiated dmObjects.

Returns:
Array of dmObject objects, or an empty array if none exist
Since:
0.5

Definition at line 57 of file dmCollection.class.php.

static dmCollection::getAuthorized (  )  [static, final]

Returns an array of all collections in the CONTENTdm(R) system to which the current user has access, as dmCollection objects.

The list of collections returned has no bearing on any restrictions set in the current dmTemplateSet. This method is API cache-aware.

Returns:
array of dmCollection objects
Since:
0.1

Definition at line 81 of file dmCollection.class.php.

Referenced by Draw::collectionsAsPulldown().

static dmCollection::getCurrent (  )  [static, final]
dmCollection::getDateSearchBeginYear (  )  [final]
Returns:
int
Since:
0.1

Implements idmViewDefinition.

Definition at line 250 of file dmCollection.class.php.

dmCollection::getDateSearchEndYear (  )  [final]
Returns:
int
Since:
0.1

Implements idmViewDefinition.

Definition at line 262 of file dmCollection.class.php.

dmCollection::getDateSearchField (  )  [final]

Loops through the collection's fields and returns the first date field it comes across.

Returns:
dmField object
Since:
0.3

Definition at line 199 of file dmCollection.class.php.

dmCollection::getField ( nick  )  [final]
Parameters:
string nick The field nickname that is used internally by CONTENTdm(R)
Returns:
The dmCollection's dmField object corresponding to $nick
False if a field with nickname $nick does not exist
Since:
0.1

Definition at line 213 of file dmCollection.class.php.

Referenced by getResultsViewFields().

dmCollection::getFields (  )  [final]

Returns an array of all fields in the collection, as dmField objects.

If the collection is the default collection, returns an array of all DC fields. Field properties are as they are defined in the CONTENTdm(R) system. To retrieve custom field properties, as for e.g. grid view, use dmCollection::getResultsViewFields().

Returns:
array
Since:
0.1

Definition at line 235 of file dmCollection.class.php.

Referenced by getDateSearchField(), and getField().

dmCollection::getMobileTemplateSet (  ) 
Returns:
dmTemplateSet
Since:
0.5

Definition at line 274 of file dmCollection.class.php.

dmCollection::getName (  )  [final]

Returns the name of the collection, as defined in the CONTENTdm(R) system.

Returns:
string
Since:
0.1

Definition at line 294 of file dmCollection.class.php.

dmCollection::getNumObjects (  )  [final]

Returns the total number of objects in the collection.

Returns:
int
Since:
0.1

Definition at line 313 of file dmCollection.class.php.

dmCollection::getNumTileColumns (  )  [final]
Returns:
int
Since:
0.1

Implements idmViewDefinition.

Definition at line 325 of file dmCollection.class.php.

dmCollection::getRecentComments ( limit = 10  )  [final]
Parameters:
int limit Positive integer
Returns:
array Array of dmComment objects

Definition at line 337 of file dmCollection.class.php.

dmCollection::getReferenceURLTemplateSet (  )  [final]
Returns:
dmTemplate object, or false if the collection is not being redirected
Since:
0.3
See also:
dmTemplateSet::getRedirectedCollections()

Definition at line 360 of file dmCollection.class.php.

dmCollection::getResultsViewFields (  ) 

Returns an array of all dmField objects that are to be displayed in grid view.

Returns:
array
See also:
dmCollection::getFields()
Since:
0.1

Implements idmViewDefinition.

Definition at line 375 of file dmCollection.class.php.

dmCollection::getTags (  ) 
Returns:
array Associative array of tag value => count pairs

Definition at line 400 of file dmCollection.class.php.

Referenced by Draw::tagsAsCloud().

dmCollection::getTemplateSet (  ) 
Returns:
dmTemplateSet
Since:
0.5

Definition at line 424 of file dmCollection.class.php.

Referenced by getMobileTemplateSet().

dmCollection::getViewerClassForExtension ( ext  )  [final]

Returns the specified viewer class for the given collection, or the viewer method for the default collection if a method for the given collection and extension has not been specified in the Control Panel.

Parameters:
string ext Filename extension
Returns:
string Class name

Implements idmViewDefinition.

Definition at line 445 of file dmCollection.class.php.

dmCollection::getViewerHeightForExtension ( ext  )  [final]

Returns the specified viewer height for the given collection, or the viewer height for the default collection if a height for the given collection has not been specified in the Control Panel.

Parameters:
string ext Filename extension
Returns:
int

Implements idmViewDefinition.

Definition at line 472 of file dmCollection.class.php.

dmCollection::getViewerMIMEForExtension ( ext  )  [final]

Returns the specified viewer MIME type for the given collection, or the MIME type for the default collection if a MIME type for the given collection has not been specified in the Control Panel.

Parameters:
string ext Filename extension
Returns:
string

Implements idmViewDefinition.

Definition at line 499 of file dmCollection.class.php.

dmCollection::getViewerWidthForExtension ( ext  )  [final]

Returns the specified viewer width for the given collection, or the viewer width for the default collection if a width for the given collection has not been specified in the Control Panel.

Parameters:
string ext Filename extension
Returns:
int

Implements idmViewDefinition.

Definition at line 526 of file dmCollection.class.php.

static dmCollection::instantiate ( alias  )  [static, final]
dmCollection::isAccessibleByTemplateSet ( dmTemplateSet tpl  )  [final]
Parameters:
tpl 
Returns:
Boolean
Since:
0.3
See also:
dmTemplateSet::isAuthorizedToViewCollection()

Definition at line 164 of file dmCollection.class.php.

dmCollection::isAuthorized (  )  [final]
Returns:
Boolean
Since:
0.4

Definition at line 182 of file dmCollection.class.php.

static dmCollection::setCurrent ( dmCollection c  )  [static, final]
Parameters:
dmCollection c
Since:
0.4

Definition at line 117 of file dmCollection.class.php.


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

Generated on Fri Aug 20 13:16:49 2010 for dmBridge PHP API by  doxygen 1.6.1