Website/Blog about free and open source projects!
Specialty: Drupal, LibreOffice/OpenOffice.org, Linux/Unix, GPL.

Add CSS/JS on a modul settings page

MODULNAME.libraries.yml


admin:
css:
theme:
css/MODULNAME.admin.css: {}

MODULNAME\Form\MODULNAMESettingsForm


public function buildForm(array $form, FormStateInterface $form_state) {
// code settings form
$form['css'] = [
'#attached' => array(
'library' => array(
'MODULNAME/admin',
),
),
];
return parent::buildForm($form, $form_state);
}
?>

Zwahlendesign:

Create Config Entities in Drupal 8 with a dragable list

Download an install the Config Entity Example module 8.x-1.x-dev Examples for Developers. Apply the patch Dragable-Entity-List-#2715179-#3.patch.

git apply -v Dragable-Entity-List-#2715179-#3.patch

Done!

Zwahlendesign:

Pages

Subscribe to ZwahlenDesign RSS