[#30172] Standard getAssociations function to use it in any extension

Related issue:
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=30172