Draw Class Reference

Inheritance diagram for Draw:
ObjectDraw ResultsDraw SearchDraw FavoritesDraw ObjectResultsDraw

Static Public Member Functions

Static Protected Member Functions


Detailed Description

Definition at line 21 of file Draw.class.php.


Member Function Documentation

static Draw::atomFeedURL (  )  [static]

Returns the HTML-escaped absolute URL to the Atom feed corresponding to the current view.

Returns:
string
Since:
0.1

Definition at line 30 of file Draw.class.php.

static Draw::collectionsAsPulldown (  )  [static]

Returns an HTML <select> menu with links to all other authorized collections.

Returns:
string
Since:
0.4

Definition at line 41 of file Draw.class.php.

static Draw::downloadImageLink ( dmObject obj,
resolutions = array(800, 1200, 1600),
separator = ' | ' 
) [static]
Parameters:
dmObject obj
array resolutions Indexed array of maximum pixel resolutions of the longest side of the image
string separator
Since:
0.1

Definition at line 94 of file Draw.class.php.

static Draw::exception (  )  [static]
Returns:
string HTML paragraph and, if debug mode is enabled, div of class dmExceptionDebug containing a stack trace
Since:
0.2

Definition at line 110 of file Draw.class.php.

static Draw::favoritesPageURL (  )  [static]
Returns:
string Absolute URI of favorites
Since:
0.1

Definition at line 162 of file Draw.class.php.

static Draw::flash (  )  [static]

Returns and erases the flash message from the user's session.

Do not use this method to check for the presence of a flash message; use Draw::isFlash() instead.

Returns:
string The HTML-escaped flash message
See also:
Draw::isFlash()
Draw::formattedFlash()
Since:
0.1

Definition at line 178 of file Draw.class.php.

static Draw::formattedFlash (  )  [static]

Returns and erases the flash message from the user's session.

The flash is returned as an <h4> element with classes dmFlash and one of dmSuccess/dmFailure/dmNeutral. Do not use this method to check for the presence of a flash message; use Draw::isFlash() instead.

Returns:
string The flash message, in a classed <h4> element.
See also:
Draw::flash()
Draw::isFlash()
Since:
0.1

Definition at line 198 of file Draw.class.php.

static Draw::getFeedURL ( format  )  [static, protected]
Parameters:
string format One of 'atom', 'rss', or some other supported output format
Returns:
string

Definition at line 546 of file Draw.class.php.

Referenced by atomFeedURL(), and rssFeedURL().

static Draw::isFlash (  )  [static, final]
Returns:
Boolean
See also:
Draw::flash()
Draw::formattedFlash()
Since:
0.1

Definition at line 221 of file Draw.class.php.

static Draw::loadTime ( round = 4  )  [static]

Returns the page load time, in microseconds.

In order to use this method, call it at the very end of a page template.

Parameters:
round Optional rounding value
Returns:
float
Since:
0.1

Definition at line 234 of file Draw.class.php.

static Draw::loginPageLink ( login_text = 'Login',
logout_text = 'Logout' 
) [static]

Conditionally draw a login or logout anchor tag depending on whether or not the user is logged in.

Parameters:
string login_text
string logout_text
Returns:
HTML anchor tag pointing to the relative URI to the login params
See also:
loginURL()
logoutURL()
Since:
0.1

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

static Draw::loginPageURL (  )  [static]

You probably don't want to draw this alongside Draw::logoutURL(); use dmCustomUser::isLoggedIn() to check whether a user is already logged in, or, preferably, use Draw::loginLink() to do this for you.

Returns:
string Relative URI to login params
See also:
Draw::logoutURL()
Since:
0.1

Definition at line 275 of file Draw.class.php.

Referenced by loginPageLink().

static Draw::logoutURL (  )  [static]

You probably don't want to draw this alongside Draw::loginURL(); use dmCustomUser::isLoggedIn() to check whether a user is already logged in, or, preferably, use Draw::loginLink() to do this for you.

Returns:
string Relative URI to logout params
See also:
Draw::loginURL()
Since:
0.1

Definition at line 291 of file Draw.class.php.

Referenced by loginPageLink().

static Draw::rssFeedURL (  )  [static]

Returns the HTML-escaped absolute URL to the RSS 2.0 feed corresponding to the current view.

Returns:
string
Since:
0.1

Definition at line 304 of file Draw.class.php.

static Draw::searchPageURL (  )  [static]
Returns:
string Absolute URI to search page
Since:
0.1

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

static Draw::tagsAsCloud ( dmCollection collection,
tag_limit = 20,
num_classes = 10,
randomize = true 
) [static]

Generates a string of CONTENTdm field vocabulary as styleable (X)HTML anchor tags.

Each anchor element has a class of "dmTag." If no tags exist, an empty string will be returned.

Parameters:
dmCollection collection
int tag_limit
int num_classes
Boolean randomize Whether to return the tags in random order or in order by count
Returns:
string HTML anchor tags

Definition at line 331 of file Draw.class.php.

static Draw::termLinkedToSearch ( text_to_link,
array $  query_terms,
array $  collections 
) [static]
Parameters:
string text_to_link
array query_terms Array of dmQueryTerm objects
array collections Array of dmCollection objects or aliases
Returns:
string HTML anchor tag
Since:
0.1

Definition at line 374 of file Draw.class.php.

Referenced by ResultsDraw::linkedSuggestion().

static Draw::vocabularyAsCloud ( dmCollection collection,
array $  field_nicks,
tag_limit = 20,
num_classes = 10,
randomize = true 
) [static]

Generates a string of CONTENTdm field vocabulary as styleable (X)HTML anchor tags.

Each anchor element has a class of "dmTag dmTagX" where X may be a number from 1 to $num_classes.

Parameters:
dmCollection collection
array field_nicks Array of field nicknames (not dmField objects)
int tag_limit
int num_classes Each tag will be returned with a class of dmTagX where X is an integer between 1 and $num_classes.
Boolean randomize Whether to return the tags in random order or in order by count
Returns:
string HTML anchor tags
Since:
0.1

Definition at line 412 of file Draw.class.php.

static Draw::vocabularyAsList ( dmField field,
linked = true 
) [static]

Returns an alphabetized list of controlled terms in a given collection's field, specified by $field.

Parameters:
dmField field
Boolean linked If true, links each term to an "exact" search for objects in $field's collection having a field nick value that matches the term.
Returns:
string Set of HTML list elements
Since:
0.1

Definition at line 488 of file Draw.class.php.

static Draw::vocabularyForSelect ( dmField field  )  [static]

Returns an alphabetized list of controlled terms in a given collection's field, specified by $field, as a set of HTML <option> elements, for embedding within a <select> form element.

Parameters:
dmField field
Returns:
string String of HTML option elements
Since:
0.4

Definition at line 531 of file Draw.class.php.


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

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