Source for file modifier.displayUrl.php
Documentation is available at modifier.displayUrl.php
* -------------------------------------------------------------
* Purpose: give back the display URL
* If the modification is preformed on a string then the (new <lib>)->getDisplayUrl method is called, (this defaults to BitPage if not specified)
* If the modification is preformed on an object then, if <lib> is given, then it is passed as the parameter to (new <lib>)->getDisplayUrl otherwise, the object' getDisplayUrl method is called
* If the modification is preformed on an array then, if <lib> is given, then it is passed as the parameter to (new <lib>)->getDisplayUrl otherwise the following is attempted:
* If the array contains an element display_url it is returned
* If the array contains an element content_type_guid then lib becomes the handler class of the content_type_guid and the array is passed as the parameter to (new <lib>)->getDisplayUrl
* If the array contains an element handler_class then lib becomes the handler_class and the array is passed as the parameter to (new <lib>)->getDisplayUrl
* If all of the above tests fail then LibertyContent::getDisplayUrlFromHash with the argument to the modifier passed as the second argument
* Example: {'My Page'|displayUrl}, {'admin'|displayUrl:BitUser}, {$gContent|displayUrl:MyObject}
* -------------------------------------------------------------
foreach ($gLibertySystem->mContentTypes as $type) {
if ($type['handler_class']== $lib) {
} elseif ((!$class_only) && ($type['content_type_guid']== $lib)) {
$lib = $type['handler_class'];
require_once($path. $type['handler_file']);
if (empty($lib)) $lib = 'BitPage';
$call = array($lib, 'getDisplayUrl');
if (!empty($pMixed['display_url'])) {
return $pMixed['display_url'];
if (!empty($pMixed['content_type_guid'])) {
$type = $gLibertySystem->mContentTypes[$pContentType];
$lib = $type['handler_class'];
if (!empty($pMixed['handler_class'])) {
$lib= $pMixed['handler_class'];
|