Miscellaneous > Roundcube Discussion

Looking for add_button() documentation

(1/1)

cheeks:
I'm working on the view elements of a plugin and find that I don't understand the arguments to add_button() (for example, some code I'm looking at has 'type'  => 'link', but what other types are valid, and how would that change the rest of the required arguments?)

I've followed all the links in the "How to get involved" doc at github, including checking out http://docs.roundcube.net/doc/phpdoc/ but I haven't found anything that describes it.  Hopefully I'm just missing something.

Thanks in advance,

Mark

JohnDoh:
add_button() has 2 params the first is an array of properties for the rcmail_output_html::button() function and the second is the name of the container to put the button in.

supported 'type's in the first param are: image, link, input (depreciated), ant button (default). You also need a 'command' key and then whatever HTML attributes you want the element to have; id, class etc.

cheeks:
Thank you for the hints, that helps.  I'll see if I can drum up some info on rcmail_output_html::button() next.

Mark

Navigation

[0] Message Index

Go to full version