All Questions
8 questions
2
votes
0
answers
51
views
How can I capture a field’s configs and storage so I can delete it and then re-create it?
I’m trying to implement this in a hook_update_N() but I’m not sure it’s proper (see excerpt below). Note I’m changing max_length in the process.
What I'm trying to do: update my_custom_entity....
2
votes
2
answers
1k
views
Create config object with array containing key-value pairs
We have a custom module, mymodule, that we want to use to create a config object for so that it can contain an array of key-value pairs. We need to be able to click button Add More on the form that ...
1
vote
1
answer
983
views
Link field is removing query parameters
We have an Article that a link field, field_link. When we create a new page of type Article, we set the link field to have a URL of www.example.com/somepath?someid=123345 and label of View. When the ...
0
votes
1
answer
1k
views
How to remove field from form and configuration?
We have a custom module, mymodule that has a form, mymoduleForm with two fields: enabled content types and urls.
We no longer need the enabled content types field on the form and want to remove it ...
0
votes
0
answers
754
views
How to delete configurations when module is uninstalled?
We have a custom module mymodule that has the following structure. It basically has a configuration object that we are using in a mymodule_preprocess_node() call to do some logic and display certain ...
4
votes
1
answer
876
views
When to create schema while working with config entity?
We have a custom form mymoduleForm.php that is used to perform some logic by calling mymodule_preprocess_node(). We were able to add addCacheableDependency() and now the mymodule_preprocess_node hook ...
2
votes
1
answer
2k
views
How to clear cache for config entity after making changes?
We have a custom form mymoduleForm that has mymodule.settings which stores some values that we need to run some logic when calling mymodule_preprocess_node() hook. The form just has a text area where ...
0
votes
1
answer
472
views
Configuration variable inside a hook take always the default value in a PHPUnit test
I'm trying to create a Functional test for the dev version of the No Autocomplete module to test that if the configuration is set then an autocomplete attribute=off will be added to the password edit ...