Last active
January 23, 2019 21:28
-
-
Save JeromeChevalier/acbbd4cbe325fb8207e63694218499e0 to your computer and use it in GitHub Desktop.
Add css classname to a Render array element #drupal8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$form['submit'] = [ | |
'#type' => 'submit', | |
'#value' => $this->t('Update user'), | |
]; | |
// Add the css classes name | |
$form['submit']['#attributes']['class'][] = 'btn btn-success'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment