Layout Builder in Drupal 8 and 9 is a game-changer, let's maximize its efficiency with some add-ons modules and learn more about the best practices in using it with atomic design.
Watch the session recording on our Youtube channel: https://www.youtube.com/c/drupalcampkyiv
Entreguerras é a denominação dada ao período do século XX que se estende do fim da primeira guerra mundial, em 11 de novembro de 1918, até o início da segunda guerra mundial, em 1 de setembro de 1939. O período foi marcado pela Grande Depressão, associada a graves tensões sociais e políticas, culminando com a ascensão dos regimes totalitários em alguns países europeus, o que neste período ocorreu também no resto do mundo. Estes graves problemas sócio-econômicos e políticos foram as causas da Segunda Guerra Mundial. Esse período entre-guerras pôs fim à hegemonia do capitalismo, quando o socialismo foi colocado em prática.
Entreguerras é a denominação dada ao período do século XX que se estende do fim da primeira guerra mundial, em 11 de novembro de 1918, até o início da segunda guerra mundial, em 1 de setembro de 1939. O período foi marcado pela Grande Depressão, associada a graves tensões sociais e políticas, culminando com a ascensão dos regimes totalitários em alguns países europeus, o que neste período ocorreu também no resto do mundo. Estes graves problemas sócio-econômicos e políticos foram as causas da Segunda Guerra Mundial. Esse período entre-guerras pôs fim à hegemonia do capitalismo, quando o socialismo foi colocado em prática.
A Guerra Civil Espanhola movimentou diversas facções ideológicas e institucionais presentes na Espanha, na década de 1930, envolvendo padres, anarquistas, civis, socialistas, republicanos, nacionalistas e diversos outros grupos.
A China, desde o século XIX, era considerada “quintal do mundo”. Mao Tse-Tung liderou uma revolução para desvinculá-la da exploração por parte de outras nações. A partir do patriotismo o Partido Comunista Chinês elaborou uma linha autônoma de socialismo, para desprender-se do vínculo com a União Soviética, o rompimento criou uma rivalidade entre os dois países.
A Guerra Civil Espanhola movimentou diversas facções ideológicas e institucionais presentes na Espanha, na década de 1930, envolvendo padres, anarquistas, civis, socialistas, republicanos, nacionalistas e diversos outros grupos.
A China, desde o século XIX, era considerada “quintal do mundo”. Mao Tse-Tung liderou uma revolução para desvinculá-la da exploração por parte de outras nações. A partir do patriotismo o Partido Comunista Chinês elaborou uma linha autônoma de socialismo, para desprender-se do vínculo com a União Soviética, o rompimento criou uma rivalidade entre os dois países.
Features are very useful for building Drupal profiles (re-usable applications). They provide a way to capture and save in code the customizations that are done to a Drupal site/application. Here I will describe how I use them in B-Translator.
Drupal 8 Every Day: An Intro to Developing With Drupal 8Acquia
Drupal 8 is coming, everyone is excited, and your developers can’t wait to use all the shiny new features. There’s just one problem: you still need to get your daily work done. Every day Drupal development requires the execution of many common patterns and scenarios.
How well do these common scenarios translate to Drupal 8? We polled Drupal developers to find what tasks we do the most and built a practical guide to using Drupal 8 in every day development.
In this presentation we’ll cover the following real world scenarios, while sprinkling in Drupal 8 best practices along the way:
- Configuration Management
- Creating and altering pages and forms
- Menu callback patterns
- Managing dependencies
How to add functionality to CMS Made Simple using Tags, User-Defined Tags, and Modules. Also includes some previews of how the module API will change with version 2.0
This presentation is a simple tutorial about developing a note taking application using TurboGears2 python framework.
The tutorial is intended to get you familiarized with the updated turbogears2 python framework.
Additional documentation/explanation can be found at http://blog.fruiapps.com/2012/05/TurboGears2-tutorial-to-create-a-simple-MVC-application
Nuxeo World Session: Layouts and Content ViewsNuxeo
Nuxeo World session on managing reusable UI components in Nuxeo technology, presented by Anahide Tchertchian during Nuxeo World 2010 (November 17-18, 2010).
Over the past two years I have been working at Malmberg to build an amazing new platform. In this presentation I would like to share the lessons we learned using Angular.
Want Spring seamlessly available inside a CMS? How about being able to integrate existing Spring apps into your CMS without rewriting a bunch of code? What about a robust CMS solution for Grails? Meet Magnolia, a mature open source CMS written in Java on the best of the Java stack (including Spring and Groovy.)
This session will introduce Magnolia's Spring integration and give you a tour of its architecture, key features and use. Along the way, you'll also get insights into the development of Magnolia's Spring integration, an overview of Magnolia's key features (like workflows, innovative multi-channel support and a damn fine user experience that includes touch devices), and brief tutorials on solving some key content management challenges faced by Spring developers. There will also be a quick detour into Magnolia's Groovy shell and MagLev, a Grails plugin for Magnolia.
This DrupalCon 2019 Amsterdam talk provides a look beyond the world of PHP and Javascript. It explores how other languages such as Ruby, Java, Rust and Perl handle things and highlights some interesting features of those languages. Not all the things that other languages can do can be done in PHP or Javascript but the concepts and ideas can still be used.
Key Insights into Development Design Patterns for Magento 2 - Magento Live UKMax Pronko
I have had a chance to speak at Magento Live UK 2016 with topic "Key Insights into Development Design Patterns for Magento 2". Feel free to share, comment, provide feedback.
In the deck i highlight Development Design Patterns used in Magento 2. I also speak about Aspect Oriented Programming and how it affected Magento 2 implementation.
More about Magento 2 read at my blog: https://www.maxpronko.com/
How AngularDart & Firebase did an App togetherJana Moudrá
Beyond seven mountain ranges, beyond seven rivers and beyond seven Google buildings lived a technology called Angular. One day it met another technology - Firebase and they decided to do an App together.
In this talk I will show you why AngularDart is a framework you should definitely take a look at and how you can use it together with Firebase to build great apps!
Core Java Programming Language (JSE) : Chapter II - Object Oriented Programming.WebStackAcademy
Object-oriented programming (OOP) refers to a type of computer programming (software design) in which programmers define not only the data type of a data structure, but also the types of operations (functions) that can be applied to the data structure.
In this way, the data structure becomes an object that includes both data and functions. In addition, programmers can create relationships between one object and another. For example, objects can inherit characteristics from other objects.
If you are new to object-oriented programming languages, you will need to know a few basics before you can get started with code. The following definitions will help you better understand object-oriented programming:
Abstraction: The process of picking out (abstracting) common features of objects and procedures.
Class: A category of objects. The class defines all the common properties of the different objects that belong to it.
Encapsulation: The process of combining elements to create a new entity. A procedure is a type of encapsulation because it combines a series of computer instructions.
Information hiding: The process of hiding details of an object or function. Information hiding is a powerful programming technique because it reduces complexity.
Inheritance: a feature that represents the "is a" relationship between different classes.
Interface: the languages and codes that the applications use to communicate with each other and with the hardware.
Messaging: Message passing is a form of communication used in parallel programming and object-oriented programming.
Object: a self-contained entity that consists of both data and procedures to manipulate the data.
Polymorphism: A programming language's ability to process objects differently depending on their data type or class.
Workflow Essentials for Web DevelopmentXavier Porter
Consider this: you’ve worked in web development for a while and you aren’t a novice developer anymore. You can dive into CSS and HTML, with the best of them, and you even know a little javascript. But now you are being told to “consider the user” in your development process and to “make your sites more accessible”. You find yourself asking, “what does all of this mean and how do I do that?”
Have no fear. This workshop will expand your knowledge of the web development process by providing you with a few essential tools and tricks needed to help you create more user-friendly and accessible websites.
The topics include:
- How to incorporate accessibility and usability from the beginning of development
- How to make your javascript components more accessible
- How to run a simple user testing session that will give you the feedback you need
- How to create a faster workflow for CSS and HTML creation from a design
Similar to Speed up the site building with Drupal's Bootstrap Layout Builder (20)
Performance Monitoring with Google LighthouseDrupalCamp Kyiv
In this session, you will learn how to track down performance and accessibility issues before they get deployed to the server.
Watch the session recording on our Youtube channel: https://www.youtube.com/c/drupalcampkyiv
Oleg Bogut - Decoupled Drupal: how to build stable solution with JSON:API, Re...DrupalCamp Kyiv
"Let's talk about Decoupled Drupal - most modern way for building websites with Drupal as web service.
The main key points are:
1. What is decoupled Drupal?
2. Decouple architecture: how and why we can use it?
3. Decoupled vs monolithic.
4. Advantages and disadvantages of decoupling.
5. Drupal web services ecosystem and JSON:API. JSON:API vs GraphQL.
6. ReactJS: how we can use it in a decoupled solution?
7. Elasticsearch as the basis for the site search system.
8. Performance tuning and caching for high-load decoupled websites.
9. Troubleshooting and use cases."
Acquia BLT for the Win, or How to speed up the project setup, development an...DrupalCamp Kyiv
Nikita Pohrebniak, Imagex
There are so many tools that can help you with every step of the development and deployment process. In this talk, we’ll explain why our company picked Acquia BLT, what it can do for you and how it can be customized to satisfy your needs.
Drupal Virtual Cafe #2, by DrupalCamp Kyiv
https://www.facebook.com/drupalcampkyiv/
Welcome “The Internet of Things” (IoT). If you have not been living in the forest last 5 years :), you might have heard this term. But if you decided to visit this DrupalCamp for the first time since you moved to the forest let’s dive into the world of IoT and at the same time look at where is Drupal in this world.
In a nutshell, the Internet of Things is the network of devices, applications, software, and many other things connected and used data to provide value to the end user.
In this session I am going to cover the following topics:
- What’s the Internet of Things?
- The Internet of Things market
- Drupal and the Internet of Things
- Examples of using the IoT in real projects
- The Future and what should we expect
In this session, I will share my experience and vision of where the IoT sphere is going and what place Drupal takes in the world of the Internet of things, and I will show you a real example of using IoT in conjunction with Drupal.
https://drupalcampkyiv.org/node/50
WHAT WE LEARNED FROM OPEN SOCIAL IN 3 YEARS, MOVING FROM AN AGENCY TO A PRODU...DrupalCamp Kyiv
This presentation will teach you the things that went well, and the things that did not go well in our journey to move our 20 people Drupal agency from a service company (bill by the hour) to a product SaaS company (bill per product, per month) called Open Social.
We will talk about funding your product, building a product, how to do marketing, sales and business development and how to grow internationally. We hope to discuss some questions as how to work with open-source and SaaS and does it help us or limit us competing with proprietary software vendors.
If you are thinking about building a product on Drupal or building a SaaS company, this is your session!
https://drupalcampkyiv.org/node/54
It is difficult to improve what is not measurable! Profiling an application should always be the first step in trying to improve its performance. With this workshop, learn how to identify performance issues in your application and adopt the best application profiling tools in your daily development habits. This workshop will guide you through the use of PHP profiling tools such as Blackfire.io to help you identify performance leaks.
Overview of the main ways to store data in Drupal 8 depending on data and needs. A detailed description of each way and examples of how to work with storages.
https://drupalcampkyiv.org/node/44
ONE MORE TIME ABOUT CODE STANDARDS AND BEST PRACTICESDrupalCamp Kyiv
In agile world when requirements changes faster than tasks got "done" status, we forced to make fast solutions that will work here and now. Being under pressure and in strict dead lines it easy to ignore code standards, "drupal way", and best practices that could be found in top Drupal sites. Tools and tips to keep your code clean.
https://drupalcampkyiv.org/node/37
This is when things get real.
Emailing with hours for preparing replies is no more.
Now it’s you and your teammate at the table.
Face-to-face live conversation, with immediate responses on hard topics.
But you can prepare yourself.
There are checklists how to plan 1-1 meeting.
There are tricks on how to act during 1-1 meeting.
We'll discuss those.
Preliminary structure
1. Goals of 1-1 meeting
2. Preparation checklist
3. 1-1 meeting structure
4. Follow-ups
5. Tricks and obstacles: real-life examples (Drupal inclusive)
To whom it may concern
- Team leaders
- HRs
- CxOs
who host and facilitate such meetings.
https://drupalcampkyiv.org/node/49
UX DURING MODULE INSTALLATION AND CONFIGURATIONDrupalCamp Kyiv
I bet everyone in his/her life used OS Windows. There are a lot of opinions on it, but, to be honest, there is one huge advantage it has - installation wizards. Almost every programme that is being installed has some kind of interaction with end user. This gives at least the illusion of control over your system and of course it allows to have already preconfigured first time experience inside application. Some wizards give more options, some less, but it is nice to have it in the first place.
So, let's think about a Drupal user, that wants to install such a complex module like Metatags or Commerce. Although there are a lot of tutorials, documents and other help materials, there is always something that prevents end users from completing this "piece of cake" for developers task on his/her own. But all that he/she needs is only make it possible to add Metatags, let's say of OG type, to content type article.
https://drupalcampkyiv.org/node/57
SWITCHING FROM QA ENGINEER TO PROJECT MANAGER - LEVEL UP OR DOWN?DrupalCamp Kyiv
I’d like to tell my story of career path with practical advice to those who is longing the same dream. Also I’m willing to describe benefits and pitfalls of such changes.
Please see below the approximate plan of my speech:
- Brief statistics data: QAs moved to PMs. Why?
- How to start? Practical advice based on my own experience.
- Cross the Rubicon. When you need to make your decisive step.
- Small tips for stress resistance and time management.
- Negative points of being PM.
- Conclusion.
https://drupalcampkyiv.org/node/51
TECHNOLOGIES-POWERED WEB AND THE POST-BROWSER ERADrupalCamp Kyiv
Digital technologies development has been on a constant rise in the past several years. Technologies such as the blockchain, AR and VR were mere whispers at the beginning of the 21st century. Today, we see these and other technologies all around us thanks to increased computing power and visionary inventors.
How new user experiences and technologies change the way we build the web, such as machine learning, voice assistants, the blockchain, VR and AR. During this session, I would like to look into the technological history starting from the invention of the web up to the looking into the future on how our interaction with technologies will look like and how we’ll build the web in the post-browser era.
https://drupalcampkyiv.org/node/56
PROTECTED CONTENT: END-TO-END PGP ENCRYPTION FOR DRUPALDrupalCamp Kyiv
In this session I wish to explain Protected Content (just released its dev version: https://www.drupal.org/project/proc), the newest Drupal wrapper for OpenPGPjs. Luckly we will see also how to integrate its Exclusive Access Links into a content type.
https://drupalcampkyiv.org/node/83
For several years, we did numerous audits for small to big websites, small agencies and huge corporations, and always faced the same issues. What should you look for when running a website audit? What tools could help you? At which level of disaster you should advice your customer to recode entirely the website?
This session covers a methodology and set of tools to organize efficiently your Drupal websites audits
https://drupalcampkyiv.org/node/73
FROM DISTRO TO CUSTOM - HOW WE CREATE GREAT COMMUNITIES FOR EVERY ORGANIZATIO...DrupalCamp Kyiv
GoalGorilla build with Open Social one of the biggest Distributions in Drupal. This distribution builds the foundation for over 1000 communities world wide. We build ourselfs some big communities for clients like the UN, Greenpeace, the Dutch Government and others. All of this clients have a very specific profile and very specific needs. All of them are from different sectors: From NGOs, to Goverment organizations, Voluntary platforms, learning platforms and much more. As well all of our clients have at core a community the goals of the community and the key features for them to reach those goals are different every time. As much as we can rely on the distribution to cover the basics and a even more, every client is different and most bigger communities needs customizations to make the step from a good to a great community.
With every new client new challenges arise. With this talk I want to share some of the insights we gathered over the last 3 years, talk about how to navigate the pitfalls of customizing a Distribution and show how we fit different platforms to the specific requirements of different clients.
This talk is for:
- Developers who use or want to use Open Social (We will discuss some modules we use and technical choices, but it will not be primarily a technical talk)
- Professionals working with online communities
- Project managers or Designers that need to conceptualize projects that are based on a Distribution
https://drupalcampkyiv.org/node/77
SEARCH API: TIPS AND TRICKS - FROM BEGINNING TO CUSTOM SOLUTIONSDrupalCamp Kyiv
I'm planning to introduce developers with Search API system during the presentation :
- What is Search API and how to deal with it;
- Overview of the most used search backends for Search API;
- What is the difference between Drupal 7 and 8 Search API;
- Faceted and fulltext search and how to use it;
- Tips and tricks regarding customization and extending of Search API / Faceted search.
Level: from Beginners to Middle+
DEVOPS & THE DEATH AND REBIRTH OF CHILDHOOD INNOCENCEDrupalCamp Kyiv
Remember when the internet was pure and unspoiled? In our innocence we saw the promise of renewal of the world through connecting, sharing, and creating online. We became developers and hackers because we wanted to understand how things work, to take them apart, and build quirky (and sometimes useful) things just for the pleasure of it.
In the earliest decades of the Internet Epoch the Internet was a playground. We happily coded directly on production systems. And it was fine, as many Great Things were created. But the Internet has matured, and has now become Big Business. Developers have matured too, and good thing they did! So many people now rely on what we’ve built, for security, for privacy, for the paycheck at the end of the month. We matter.
Maturity has come at a price though, and deploying well tested code into complex applications with polyglot teams working with heterogeneous stacks, all while maintaining compliance with GDPR, HIPAA, PCI, etc. has taken all of the childhood innocence out of the web. Now even the simplest website seems like Hard Work.
In this talk I will show how we can, and should, regain our joyful demeanor, how we can use the maturity of the most innovative tools around us to start hacking like crazy again. Without regressing on agility, testing, compliance, scalability or robustness. I use the metaphor of childhood innocence to explain how the complexity of modern cloud computing, in combination with increasing quality expectations and compliancy, has curtailed the creative freedom of developers, and as a whole, organisational motivation.
Together with a lack of resources and idea time, this leads to lower and slower product innovation. We are, however, at the brink of a paradigm shift in cloud computing that will give developers and hackers their mojo again. This talk will zoom into the key elements of this paradigm shift, and provide an overview of the basic concepts and operational practices of the new age of developer innocence.
https://drupalcampkyiv.org/node/81
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
5. DrupalCon
Vienna 2017
● Dries has announced some
initiatives that enhances the user
experience for site builders.
● One of these initiatives was the
Layout Builder, which later
become a Drupal core module.
5
8. UI kits
8
● Made an extensive UI kit / guide for
the developers
● Listed both foundations and
components
● Started adding more responsive
version for each component
9. Annotations
9
● The designer numbers the components that
annotates the descriptions in the footer of the
page.
● This helps BA and Dev will use this to
understand the initial the feature
requirements.
● It’s good for keeping a discussion around a
component
● Client will use this to understand how the
elements and pages interact.
● We use the same numbers on other pages if we
are using the component
15. Plugins Group
● Plugins group is a wrapper of one or
more style plugin.
● It displays in the groups if at least one
of its plugins is enabled.
● It can contain any shared
configurations for its plugins.
15
16. How to
define a
new
group
plugin?
● Create the plugin group:
MODULE_NAME/src/Plugin/BootstrapStyles/StylesGroup/PLUGIN_GROUP_NAME.php
● Define the annotation.
16
@StylesGroup(
id = "background",
title = @Translation("Background"),
weight = 1,
icon = "bootstrap_styles/images/plugins/background-icon.svg"
)
● Add the class & the functions:
class GROUP_PLUGIN_NAME extends StylesGroupPluginBase {
------------ #1 ---------------
// Add elements to the configuration form.
public function buildConfigurationForm(array &$form, FormStateInterface $form_state) {}
// Saves the elements’ values to the form state.
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {}
------------- #2 ---------------
// Add elements to Layout Builder dialog.
public function buildStyleFormElements(array &$form, FormStateInterface $form_state, $storage) {}
// Save the elements' values in the component settings.
public function submitStyleFormElements(array $group_elements) {}
}
17. Background group example - #1
17
class GROUP_PLUGIN_NAME extends StylesGroupPluginBase {
// Add elements to the configuration form.
public function buildConfigurationForm(array &$form, FormStateInterface $form_state) {}
// Saves the elements’ values to the form state.
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {}
}
18. Background group example - #2
18
class GROUP_PLUGIN_NAME extends StylesGroupPluginBase {
// Add elements to Layout Builder dialog.
public function buildStyleFormElements(array &$form, FormStateInterface $form_state, $storage) {}
// Save the elements' values in the component settings.
public function submitStyleFormElements(array $group_elements) {}
}
@StylesGroup(
id = "background",
title = @Translation("Background"),
weight = 1,
icon = "bootstrap_styles/images/plugins/background-icon.svg"
)
20. How to
define a
new
style
plugin?
● Create an style plugin:
MODULE_NAME/src/Plugin/BootstrapStyles/Style/STYLE_PLUGIN_NAME.php
● Define the annotation.
20
@Style(
id = "background_color",
title = @Translation("Background Color"),
group_id = "background",
weight = 1
)
● Add the class & the functions:
class STYLE_PLUGIN_NAME extends StylePluginBase {
------------ #1 ---------------
// Add elements to the configuration form.
public function buildConfigurationForm(array &$form, FormStateInterface $form_state) {}
// Saves the elements’ values to the form state.
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {}
------------- #2 ---------------
// Add elements to Layout Builder dialog.
public function buildStyleFormElements(array &$form, FormStateInterface $form_state, $storage) {}
// Save the elements' values in the component settings.
public function submitStyleFormElements(array $group_elements) {}
------------- #3 ---------------
// Convert the storage to classes or attributes and merge them with the element’s render array.
public function build(array $build, array $storage, $theme_wrapper = NULL) {}
}
21. Background Color example - #1
21
class STYLE_PLUGIN_NAME extends StylePluginBase {
// Add elements to the configuration form.
public function buildConfigurationForm(array &$form, FormStateInterface $form_state) {}
// Saves the elements’ values to the form state.
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {}
}
22. Background color example - #2
22
class STYLE_PLUGIN_NAME extends StylePluginBase {
// Add elements to Layout Builder dialog.
public function buildStyleFormElements(array &$form, FormStateInterface $form_state, $storage) {}
// Save the elements' values in the component settings.
public function submitStyleFormElements(array $group_elements) {}
}
23. Background color example - #3
23
class STYLE_PLUGIN_NAME extends StylePluginBase {
// Convert the storage to classes or attributes and merge them with the element’s render array.
public function build(array $build, array $storage, $theme_wrapper = NULL) {}
}
25. KING
Tab #1 Layout ● Developer can create breakpoints and
responsive layouts.
● Content editor can choose how the
content display on different devices.
25
26. KING
Tab #2 Style
● Let’s use Bootstrap Styles’ plugins in Bootstrap Layout Builder (Layout Builder Section).
26