Render a button in a block I want to display a button on the homepage. The best solution i've thought about was to render it in a block. The code is the following :

  $button['my_tickets'] =array(
    '#type'       =&gt; 'link',
    '#title'      =&gt; t('My tickets'),
    '#href' =&gt; '',
    '#class' =&gt; 'btn btn-default',
    '#id' =&gt; '',
    '#options' =&gt; array(
      'html' =&gt; true,
    )
  );


And here's the theme :

  function My_module_theme() {
    return array(
      'my_module_my_button' =&gt; array(
        'variables' =&gt; array('vars' =&gt; NULL),
        'template' =&gt; PATH_TO_TEMPLATE,
      ),
    );
  }


Problem : The link isn't rendered with the classes inside the "a" tag. How can I do that ?
I think the classes should be added in the attributes array:

 $button['my_tickets'] =array(
    '#type'       =&gt; 'link',
    '#title'      =&gt; t('My tickets'),
    '#href' =&gt; '',
    '#attributes' =&gt; array('class' =&gt; array('btn', 'btn-default')),
    '#id' =&gt; '',
    '#options' =&gt; array(
      'html' =&gt; true,
    )
  );