Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
We have been talking about this for a while but this has most recently emerged from the discussion in #1834828: Add ability to create view snapshots.
We should abstract the usage of $entityInfo['config_prefix'] in to a getConfigPrefix method; This allows this to easily be overridden by other storage controllers if needed, as well as being able to add additional logic to the value returned too.
Comment | File | Size | Author |
---|---|---|---|
#3 | 1849792-2.patch | 3.74 KB | damiankloip |
#1 | 1849792.patch | 3.74 KB | damiankloip |
Comments
Comment #1
damiankloip CreditAttribution: damiankloip commentedHere is a new patch, I have added the start of some unit tests (only tests the getConfigPrefix() method currently). I also added getConfigPrefix usage in the save() method.
Unfortunately we can't use this when getting the manifest file (yet?) as we don't want a '.' appended to the prefix.
Comment #2
dawehnerThe actual code is looking fine, just found some small nitpicks.
Contains :)
Sshould be probably be public.
Comment #3
damiankloip CreditAttribution: damiankloip commentedYeah, both good points :)
Comment #4
xjmSee also:
#1760358: Provide a way to extract the ID from a config object name
#1831774: Config import assumes that 'config_prefix' contains one dot only
Comment #5
tim.plunkettThis looks great.
Comment #6
catchMakes sense. Committed/pushed to 8.x.