|
dmBridge PHP API
|
Inheritance diagram for DMObjectTemplateHelper:An class consisting of helper methods to assist in creating web page templates. These methods are specific to object view and are neither guaranteed nor expected to work in any other view.
This class was called ObjectDraw in dmBridge 1.x.
Definition at line 19 of file DMObjectTemplateHelper.php.
| DMObjectTemplateHelper::getHtmlAddFavoriteButton | ( | ) |
Definition at line 26 of file DMObjectTemplateHelper.php.
| DMObjectTemplateHelper::getHtmlChildLinksAsList | ( | $ | thumbs = false | ) |
Returns a hyperlinked ordered list of each of the pages of the current object wrapped in <li> elements. The <li> element of the current page is of class dmCurrentPage, and the <ol> element itself is of class dmChildLinks.
For compound objects with more than a few pages, you may want to put this list inside of a div that has a fixed CSS height, and overflow set to "auto", which will cause it to appear with a scrollbar, like an iframe.
| Boolean | thumbs Whether or not to append thumbnails to the pages |
Definition at line 68 of file DMObjectTemplateHelper.php.
| DMObjectTemplateHelper::getHtmlChildLinksAsPulldown | ( | ) |
Returns a complete HTML form with a pulldown menu consisting of each of the pages of the current object as <option> elements.
Note: This method requires that JavaScript be enabled in the browser. Using drawChildLinksAsList() instead is preferred for usability.
Definition at line 106 of file DMObjectTemplateHelper.php.
| DMObjectTemplateHelper::getHtmlCommentsSection | ( | ) |
Draws the HTML for the comments section.
The HTML structure will vary depending on whether the object has any comments, and whether commenting is enabled.
Definition at line 144 of file DMObjectTemplateHelper.php.
| DMObjectTemplateHelper::getHtmlCompoundObjectPageNumbersInSearchResultsAsString | ( | $ | separator = ", " | ) |
| string | separator |
Definition at line 284 of file DMObjectTemplateHelper.php.
| DMObjectTemplateHelper::getHtmlCompoundObjectSearchForm | ( | $ | button_text = "Search Object Text" | ) |
| string | button_text |
Definition at line 247 of file DMObjectTemplateHelper.php.
| DMObjectTemplateHelper::getHtmlCompoundPageFlipLinks | ( | $ | separator = " | ", |
| $ | prev_page_link = "< Previous Page", |
||
| $ | next_page_link = "Next Page >" |
||
| ) |
Provides navigation links between compound object pages.
| string | separator |
| string | prev_page_link |
| string | next_page_link |
Definition at line 319 of file DMObjectTemplateHelper.php.
| DMObjectTemplateHelper::getHtmlDownloadImageLink | ( | $ | resolutions = array(800, 1200, 1600), |
| $ | separator = " | " |
||
| ) |
| DMObject | obj |
| array | resolutions Indexed array of maximum pixel resolutions of the longest side of the image |
| string | separator |
Definition at line 366 of file DMObjectTemplateHelper.php.
| DMObjectTemplateHelper::getHtmlHighlightedFullText | ( | ) |
Outputs text with highlighted terms in <span> elements with class "dmHighlightedTerm".
Simply apply the CSS background-color property - or whatever other properties you like - to this class.
Definition at line 386 of file DMObjectTemplateHelper.php.
| DMObjectTemplateHelper::getHtmlMetadataAsDL | ( | $ | ctrld_term_separator = null, |
| $ | link_ctrld_terms_to_view = null, |
||
| $ | add_link_to_feed = true, |
||
| $ | omit_title = false, |
||
| DMObject $ | object = null, |
||
| $ | hyperlink_urls = true |
||
| ) |
Returns object metadata in an HTML definition list, which is probably the most semantic way to mark it up using the HTML element set.
This list can be styled with CSS. Fields that are set as both searchable and controlled in CONTENTdm® are automatically hyperlinked to searches.
| string | ctrld_term_separator Character or character sequence that should separate controlled terms |
| [string|null|false] | link_ctrld_terms_to_view One of 'grid', 'list', 'tile', null (use default view), or false (don't link them) |
| Boolean | add_link_to_feed |
| Boolean | omit_title Whether to omit the title field |
| DMObject | An optional DMObject whose metadata to display. If null or not provided, the current DMObject's metadata is displayed. |
| hyperlink_urls | Whether to add <a> tags around URLs in metadata |
Definition at line 416 of file DMObjectTemplateHelper.php.
| DMObjectTemplateHelper::getHtmlMetadataAsMetaTags | ( | ) |
Returns object metadata as HTML meta tags.
Definition at line 520 of file DMObjectTemplateHelper.php.
| DMObjectTemplateHelper::getHtmlPreviousNextLinks | ( | $ | separator = " | ", |
| $ | prev_text = "< Previous", |
||
| $ | next_text = "Next >" |
||
| ) |
| string | separator |
| string | prev_text |
| string | next_text |
Definition at line 552 of file DMObjectTemplateHelper.php.
| DMObjectTemplateHelper::getHtmlRatingsSection | ( | $ | min, |
| $ | max, | ||
| $ | multiple_of, | ||
| $ | decimal_places = 2 |
||
| ) |
| int | min |
| int | max |
| float | multiple_of |
| int | decimal_places Ratings will be rounded to this many decimal places for display |
Definition at line 596 of file DMObjectTemplateHelper.php.
| DMObjectTemplateHelper::getHtmlResultsAsUL | ( | $ | thumbs = false, |
| $ | max = 5 |
||
| ) |
Returns an ordered list containing objects from the most recently viewed results list.
| Boolean | thumbs Whether or not to display object thumbnails |
| int | max If larger than the number of results appearing on the last results view page, that number will be used instead |
Definition at line 653 of file DMObjectTemplateHelper.php.
| DMObjectTemplateHelper::getHtmlTaggingSection | ( | ) |
Definition at line 716 of file DMObjectTemplateHelper.php.
| DMObjectTemplateHelper::getHtmlViewer | ( | $ | width = null, |
| $ | height = null, |
||
| $ | js = true |
||
| ) |
| int | width Width override (normally, width should be set in the Control Panel) |
| int | height Height override (normally, height should be set in the Control Panel) |
| bool | js Whether to include required JavaScript code. If false, you must manually include the necessary code in the template. |
js parameter is deprecated. Please avoid using it. Definition at line 756 of file DMObjectTemplateHelper.php.