Skip to content
Snippets Groups Projects
Commit 51344bf4 authored by Adrian Lorenc's avatar Adrian Lorenc Committed by Ilias Dimopoulos
Browse files

ISAICP-9459: Update logic.

parent a597f3a6
No related branches found
No related tags found
1 merge request!209Release 2.2.0
......@@ -15,10 +15,10 @@
*/
function ventuno_preprocess_paragraph(array &$variables): void {
$variables['#attached']['library'][] = 'ventuno/paragraph';
$bundle_library = 'ventuno/paragraph__' . $variables['paragraph']->bundle();
$bundle_library = 'paragraph__' . $variables['paragraph']->bundle();
if (array_key_exists($bundle_library, \Drupal::service('library.discovery')
->getLibrariesByExtension('ventuno'))) {
$variables['#attached']['library'][] = $bundle_library;
$variables['#attached']['library'][] = 'ventuno/' . $bundle_library;
}
$variables['attributes']['class'][] = 'paragraph--' . str_replace('_', '-', $variables['paragraph']->bundle());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment