wieni / wmsettings Goto Github PK
View Code? Open in Web Editor NEWProvides an Editor UI and Developer API for managing custom settings
License: MIT License
Provides an Editor UI and Developer API for managing custom settings
License: MIT License
Add an event listener / hook implementation that installs new base fields when necessary.
The wmsettings_key
base field isn't being installed on new entity types until automatic entity updates have been run. Since Drupal 8.7.x, support for automatic entity updates has been removed, so now this base field isn't being installed at all.
We noticed in the slow query log that there is a recurring query on a non-indexed column:
(site: bruzzdev)
SELECT base_table.id AS id, base_table.id AS base_table_id
FROM
settings base_table
INNER JOIN settings_field_data settings_field_data ON settings_field_data.id = base_table.id
WHERE settings_field_data.wmsettings_key LIKE 'global\\_settings' ESCAPE '\\';
Task at hand: solve by
a. Add an index on that basefield (https://drupal.stackexchange.com/questions/221410/how-to-add-a-database-index-to-a-base-field)
b. cache the results of the query
Note: I don't know where that query happens. I suspect somewhere in wmsettings but that's not a given.
phpstan.neon
config file referencing the wmcodestyle
rule files (example)phpstan analyse
to the coding-standards
composer scriptautoload-dev
entry to ensure autoloading during analysisWhen wmsettings installs it makes a Global bundle. This has a problem. When you create model out of it then the word global and the class global all have issues. Have it create a bundle called "site".
Automatically remove bundle from config when it's deleted.
Saves time.
wieni/wmcodestyle
Why was this needed?
If you need to provide a template with a Setting entity, do so from the controller / preprocessor.
By loading it from within the template you've skipped registering it's cache tags!
Replace all calls to the applyUpdates
method of the entity.definition_update_manager
service with a custom solution. Since new base fields are added dynamically, we can't use update hooks to install these fields. The same problem has been fixed already on the latest version of wmcontent.
Since Drupal 8.7.x, support for automatic entity updates has been removed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.