Problem/Motivation
Provide a new entity type to store SEO URLs instead of the taxonomy term.
Why:
Although it is unlikely, there is a possibility that the site where the module will be installed will already have a taxonomy term with the same name. Or fields with such names will already exist, which will lead to a conflict.
Proposed resolution
- Create a new entity type seo_url.
- Add all required fields via BaseFieldDefinition (names and types of the fields must be the same)
- Make new permissions for a new entity type
- Update SeoUrlManagerInterface::ENTITY_TYPE and SeoUrlManagerInterface::ENTITY_BUNDLE
- Implement all required changed for 'seo_urls.create' route
- Add new admin links to be able to configure new entities
Issue fork seo_urls-3351559
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
hitchshockComment #5
hitchshockCreated a new SEO URL entity type.
Removed SEO URL vocabulary.
Refactored the code.
Tested the code:
- Entity object - OK
- Entity permissions - OK
- Extra seo_url.create route - OK
- Token - OK
- Checked code via phpcs and phpstan - OK