void smarty_modifier_displayUrl_findLib(
&$lib, [ $class_only = false])
|
|
Smarty plugin
------------------------------------------------------------- Type: modifier Name: displayUrl 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} -------------------------------------------------------------
Parameters