Saving widgets as entities so they can be annotated with likes

Hi -

I am working on making a plugin so that users can 'like' widgets. For instance, a user would be able to like the photo album widget on another users' profile.

From a response to an earlier post (http://community.elgg.org/discussion/view/1495360/add-like-button-to-widgets-on-profile-page), I think that what I need to do now is to save the profile widgets as entities, because only entities can be annotated with likes.

Can anyone explain what I need to do to save each of the widgets on a users' profile as entities and then make it so that they can be annotated with likes?

Thanks very much!