For most buttons it is enough to use the function explained here. It returns an array which contains a string with a formatted itemlist that your buttons can use as is.

Name

linodef_buttonsapi_itemlist

Parameter

string $calling_module
The name of the module that calls this function. Needed for javascript file and function to use when clicked on an item.
string $drupal_element
The element to retrieve the data from. This has to be a supported element type.
string $option_string_path
(Optional) Containing tag options, separated by "_" instead of "," (path compatible).

Return