LPS-42439 Moves function to Util class
LPS-42439 SF
LPS-42439 Removes unused code
LPS-42439 Moves allMetadataFields var closer to where they are used
LPS-42439 Moves enableConversions and conversions vars closer to where they are used
LPS-42439 Moves viewInContext var closer to where they are used
LPS-42439 Gets assetEntryXml from portletPreferences inside the function instead of pass a param
LPS-42439 Moves addPortletURLs var closer to where they are used
LPS-42439 Removes unnecessary var
LPS-42439 Uses method to get if the permissions are enabled instead of assetEntryQuery
LPS-42439 Creates new method to get the categoryIds like in tags
LPS-42439 Moves anyAssetType var closer to where they are used
Moves closer
Uses var
Adds new method