Updating Current workaround, to match the default paths:
"drupal-scaffold": {
"locations": {
"web-root": "web/"
},
"file-mapping": {
"[web-root]/sites/default/default.services.yml": false,
"[web-root]/sites/default/default.settings.php": false
}
},
You're welcome @heddn, thanks for maintaining all the Migrate modules, I appreciate it very much.
Perfect, thanks!
Great that you found a solution! Feel free to add [Solved]
first in the title:
[Solved] How to allow users to publish/unpublish their own content?
Great you found a solution!
To avoid "odd" errors such as these in the future, you should consider switching to a more stable development platform, manual systems such as MAMP are not recommended.
With DDEV, you always get the exactly identical set up, even on different Operating Systems. That way you can have developers working on the same project using Linux, Windows, MacOS, without any problems.
It is generally recommended to use a Docker-based solution → , such as DDEV or Lando, for local Drupal development, rather than manually installing MAMP.
From https://www.drupal.org/docs/develop/local-server-setup/mac-os-developmen... →
No problem @anybody, it's only natural that sometimes some things happen elsewhere, when you improve Drupal :)
And thanks for a fast reversion @nod_.
Maybe the title could be updated, and refined afterwards? (I also thought about "Allow table cell content to stay at the top, as tall cells on same row").
You're welcome, it's great that it looks good everywhere now :) About finding the problem, Gitlab is great like that -- I just had to find out which CSS file caused the problem (claro/css/components/tables.css) and then look under"History" for that file:
https://git.drupalcode.org/project/drupal/-/commits/11.x/core/themes/cla...
As you can see, the update was just reverted by @nod_, so an alternative solution will have to be found for the problem of big pieces of content pushing down some fields ... We could remove the vertical-align: middle;
but it's probably safest to keep it in case other admin themes in the future does something similar ...
Thanks for fast and great feedback, have a nice day.
I understand the thought behind this change, but it has unintended consequences all over the place, as I see it ... For example in the Token module modal, but also in Views, where the lines now are not aligned beautifully, but pushed at the top up in tables and the Views UI.
Also, why do we need to update the th
in the first place?
Drupal 11 - A Views table and Views interface adding a field
Table, before and after
Views UI -- adding a field, before and after
Token module is also affected
See also this MP4 file: overlap.mp4 →
I think this needs to be rolled back, and given some more thought ...
Sounds great with the larger font, let's see what the maintainers say.
About the overlap. It's because all text strings are pushed to the top in Drupal 11 Claro, including the table headers "Name", "Token", and "Description" ... If you check the patch (click plain diff at the top), it should not affect the table headers.
It turns out that the cause was a recent update to Claro, aligning td's and th's vertically at the top. I didn't see it, because I wasn't using the latest Drupal 11 dev (nor Token, actually)... Lesson learned: Always use dev-version :)
I updated the patch, and it seems fine in Drupal 11 now, but maybe you can check? Thanks!
You don't share your dev environment, but the Drupal community selected DDEV as the recommended local development environment in June 2024. DDEV is an open source docker-based tool for creating local web development projects in minutes. Perhaps give it a try, if you're not already using it?
https://www.drupal.org/docs/getting-started/installing-drupal/install-dr... →
Since you are doing an upgrade anyway, pinning would be all right, I guess.
Also, it looks like 10.3.0 is good enough:
Drupal sites running 10.2.x or earlier versions must first update to 10.3.0 or later [my emphasis] prior to updating to Drupal 11, because all core updates added prior to 10.3.0 have been removed. If any modules or themes have been removed → you may use the respective contributed project instead.
From https://www.drupal.org/docs/upgrading-drupal/upgrading-from-drupal-8-or-... →
Always always, test the upgrade thoroughly on a test version, before actually doing it.
About Composer ... it can be finicky and complicated. Your question about why is probably better asked in the Composer issue queue :)
Maybe use a Gitlab fork, to streamline the process?
Adding related issues.
ressa → created an issue. See original summary → .
I found this issue looking for a way to show Field Groups in multiple columns, which is more simple than what is requested here, but I'll share my solution, in case anyone else ends up here, looking for the same.
I needed to show multiple Field Groups in two columns, to be used as Leaflet Pop Up source, and in my case it was pretty simple:
- Create two new Field Groups of type "HTML Element", with class
muni_col1
andmuni_col2
- Drag the existing Field Groups under these two new Field Groups, so that they were now the top level Field Groups
- Add a little CSS
This resulted in a structure like this:
<div class="leaflet-popup-content">
<div class="node__content">
<div class="muni_col1">
<div class="field-group">
<h3>Column #1</h3>
</div>
<div class="field-group">
<h3>Column #2</h3>
</div>
</div>
<div class="muni_col2">
<div class="field-group">
<h3>Column #3</h3>
</div>
<div class="field-group">
<h3>Column #4</h3>
</div>
</div>
</div>
</div>
The CSS:
/* split up in two columns with Field group */
.leaflet-popup-content .node__content {
display: flex;
}
.leaflet-popup-content .muni_col1,
.leaflet-popup-content .muni_col2 {
width: 100%;
}
You can see it here, by clicking on an area of the map: https://arst.dk/kort
You're welcome! I am glad I could help.
Maybe you have already seen it, but there is a module for WordPress to Drupal migration:
https://www.drupal.org/project/wordpress_migrate →
I created the issue 📌 Create a comprehensive documentation page for WordPress Developers new to Drupal Active .
ressa → created an issue.
A pro pos Custom Post Types, Craft CMS yesterday announced their new wp-import tool in Migrating from WordPress.
Maybe it can serve as inspiration for importing custom fields into Drupal, and possibly also the process or GUI?
Thanks, to better be able to help you, please check the guidelines for Composer questions, including the link to the best way to ask:
Thanks @msielski, that sounds incredible! I am subscribed to all WordPress Migrate issues, so I will be ready to test a MR, when I see it in the issue queue.
I have limited experience with WordPress, but this video got me started with SCF Unlock WordPress Potential: A Beginner's Guide to Advanced Custom Fields. I managed to create a Custom Post Type with a few fields, but not a List (Drupal: View) ... it looks like the method changed a bit ...
Thanks for the review @rkoller, and generally all your great work with Accessibility in Drupal, I very much appreciate it!
About font sizes ... you're right. The link size was bigger than the rest of the text ... I thought about it, and tried using padding instead, to increase the target size. And let's see what the admins thin about increasing the font size from 0.85em to 1em.
About the overlap, I can't replicate it ... it looks like the text is top-aligned in your picture. It looks fine in my Firefox, but maybe you are using another browser?
It looked like the patch was slightly outdated:
$ patch -p1 --dry-run < 15.diff
checking file README.md
checking file core/confirm-consensus.md
checking file core/drupal-core.md (renamed from drupal-core.md)
Hunk #1 succeeded at 60 (offset 2 lines).
I tried rebasing it, which seems to have fixed it, by leaving a comment with the string /rebase
in the MR:
2. If the changes in the "x commits behind" do not conflict with anything in the MR then you can rebase via the UI. There is no 'rebase' button, but just enter a comment with the single word
/rebase
including the leading / and this will trigger a rebase.
From Rebase a merge request → .
Great work @phjou and @hongpong!
Support for importing custom fields, would be an awesome feature. And I guess, adding support for some of the most popular plugins, starting with Yoast, and adding more down the line? Thanks!
Thanks everyone for working on this. "hold onto" means keep doing something, which slightly contradicts the first part of the sentence ... But I assume the decision is "No D9 support"?
I think that will be fine. After all, Drupal 9 reached end of life November 2023 https://www.drupal.org/about/announcements/blog/drupal-9-is-end-of-life → .
You're welcome @lostcarpark, thanks for creating it! Actually, I notice that the menu should be updated as well ... Maybe someone can update it to "Project Browser setup on DDEV" or add you and/or me as doc admins as well?
Perfect, thanks for the great work!
Thanks @bbu23 for creating an implementation of the proposed solution so fast!
It looks great, and it feels more intuitive now. (There was a single detail, I added a comment in my review.)
I think the reason the "Export type" thing caused me a slight confusion, is because this module is strictly about menus, and as a user, I just don't expect to wrangle with a new concept of "Types". Also "Type" doesn't give any meaning to me.
Thinking more about it, the individual items (types/exports) could get a more specific name, more special than "Menu exports" ... "Menu group" could work, to signify that this is a collection of menus? Or even "Menu collection"? Or maybe it again just could be a cause of confusion, introducing new concepts ...
So all in all, I am a fan of the current POC :)
Later, the author clarifies that support for multiple custom sort criteria labels is needed. Please see the issue I created.
DDEV Drupal Contrib
Thanks for adding DDEV Drupal Contrib @lostcarpark!
--create-docroot
is no longer needed, nor --project-name
, DDEV simply uses the parent folder name. Also, maybe let's link to the project?
Alpha, Beta, etc.
About using Beta in the title, I have created
📌
Describes changes between version 1 and 2 on project page
Active
and will go ahead and remove mentions of Beta in the title. I also added a comment about relaxing minimum-stability
to alpha
to be able to try out Project Browser version 2, in the general install guide.
Perfect @hansfn, the "FAQ" page is now above "Terminology" in the menu, and main page. Thanks!
If this is for local development, perhaps consider DDEV? https://ddev.com/
If it's on a live server, of course not.
It's really strange how we both missed Structure Sync ... maybe due to bad SEO? When you search for relevant menu export import modules, with something like "site:drupal.org export menu configuration" you get a few "it doesn't work" Structure Sync issues, but are mostly guided to other modules ...
I do understand why Menu Migration should stay on this route, to differentiate itself.
> ... Structure Sync [...] they also seem to have more control over partial and full imports, which my module lacks.
Actually, it's true that via the Structure Sync GUI you can select individual menu's, but not with Drush. That's a case of "Export All The Things" or nothing. So in that department Menu Migration has the lead :)
$ drush export:menus -h
Export menu links.
Global options:
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
-y, --yes Auto-accept the default for all user prompts. Equivalent to --no-interaction.
-l, --uri=URI A base URL for building links and selecting a multi-site. Defaults to https://default.
To see all global options, run `drush topic` and pick the first choice.
Aliases: em, export-menus
Structure Sync is using Drupal's default storage location of the sync directory → , except if it's overridden by the user.
For the export and import process, see https://www.drupal.org/docs/extending-drupal/contributed-modules/contrib... →
I added the export and import steps under https://www.drupal.org/docs/extending-drupal/contributed-modules/contrib... →
Thanks @benjaminbradley for outlining the export and import process in #6.
I added it to the documentation under https://www.drupal.org/docs/extending-drupal/contributed-modules/contrib... →
Add example of the export and import process, and steps required for a deployment.
You're welcome, thanks!
Thanks @mlncn and @louis-cuny. I added the Drush commands and import choices to https://www.drupal.org/docs/extending-drupal/contributed-modules/contrib... → from the project page so that the community can pitch in with writing the documentation. On the project page, only maintainers can update.
I just did some menu synchronization. I first tried with drush import:menus --choice=safe
, which caused all menu items to be duplicated, but drush import:menus --choice=full
worked well. So an extra section, or just a comment or two about how choices and menus work together would be nice on that page.
Also, the order of commands during export and import could be added as well, something like this? (please correct if wrong ...)
- Develop locally and export
drush export:menus drush config:export
- Import on the server
drush config:import drush import:menus --choice=full
The eternal challenge of naming things is rearing its ugly head again!
I get your dilemma, since the other option of import/export also has Drush integration, in its own way ...
Thanks for elaborating with your thoughts behind the naming. After all is considered, maybe it should stay named as it is, but the description below could feature the word "Drush" prominently and explain how it is different? Maybe something along these lines?
Quick Action Settings
Drush-driven exports and imports, for a faster process.
Thanks for a fast answer, as always!
The reason is that when I created this module, I wanted a clear separation from the Drupal's configuration folder.
I do get your point about differentiating this module from other sort of similar modules, so from that perspective it does make sense.
I did try Menu Export originally, but it didn't seem to work with Drush... which was what attracted me to Migrate Menu. I somehow missed Structure Sync ... but it looks like it might be a better fit for my needs -- since I desire a pure Drush solution :)
And you're right, destination/source can always be overridden. Thanks for considering adding the format option, YAML is easier to scan!
Actually, I have been thinking more about this, and I think the GUI part should maybe be removed, for a more "pure" Drush integration ... I created a follow up issue.
Thanks @bbu23, this is perfection!
Heh, a little extra concern can sometimes be a good thing :)
It sounds great, that you will think about it. And who knows, maybe someone else will step up and tackle it? Let's see ...
Thanks @bbu23, fantastic news! I did a review, and a few minor suggestions. It's awesome to have Drush support again.
Outstanding work! I tried it and it worked really well: I added the patch, ran drush updatedb
, exported and imported a menu. Everything went smoothly, so as far as I can tell, it works perfectly.
There were a few details in the documentation, about using full commands vs. aliases. But that's a very minor issue. I added comments and suggestions, and if you agree with them, you should be able to simply commit my suggestions via the Gitlab GUI.
Thanks again, this is great!
I don't want to change what a user cannot see.
I agree with that, and also what I tried to say ... sorry if I did not express myself clearly.
I do not propose to update code or code comments (#2 and #3 -- as I wrote "...which probably don't need to be updated"), but only strings which the user can see through the GUI or Drush, which is section #1, "1. UI occurrences where "type" could be updated".
From what I can tell, all the 103 lines of code under section #1 can be exposed to the user. Or maybe I am missing something ...
But maybe that is doable after all?
I do think switching from "type" to "menu" would be an improvement, and more user friendly. But it all comes down to how big an effort it takes ... I'll let you decide, if it's worth it :)
I had a look at it, and it may be a pretty big task ... Below (see section "1. UI occurrences ...") public facing strings in the UI, which need to be updated are listed.
I also include the occurrences of "type" which probably don't need to be updated in section 2 and 3, since they are code, and not exposed via the GUI or Drush.
The strings and files which need to be updated include permissions, since they are exposed in the GUI. I guess this would mean update hooks are also needed?
Perhaps this is too much work, for too little gain? We could set this to Postponed, so that anyone who feels like it in the future, can take a stab at it :)
-
UI occurrences where "type" could be updated
./menu_migration.links.action.yml: title: 'Add export type' ./menu_migration.links.action.yml: title: 'Add import type' ./menu_migration.links.menu.yml: title: 'Export Types' ./menu_migration.links.menu.yml: title: 'Import Types' ./menu_migration.links.task.yml: title: 'Export types' ./menu_migration.links.task.yml: title: 'Import types' ./menu_migration.module: $output .= '<dd>' . t('1. drush mme EXPORT_TYPE_ID: Executes the export for the given Export Type ID. Requires confirmation') . '</dd>'; ./menu_migration.module: $output .= '<dd>' . t('1. drush mmel: Lists all the available Export Types that are compatible with Drush') . '</dd>'; ./menu_migration.module: $output .= '<dd>' . t('1. drush mmi IMPORT_TYPE_ID: Executes the import for the given Import Type ID. Requires confirmation') . '</dd>'; ./menu_migration.module: $output .= '<dd>' . t('1. drush mmil: Lists all the available Import Types that are compatible with Drush') . '</dd>'; ./menu_migration.module: $output .= '<dd>' . t('1. Navigate to Configuration → Development → Menu Migration → Export Types') . '</dd>'; ./menu_migration.module: $output .= '<dd>' . t('1. Navigate to Configuration → Development → Menu Migration → Import Types') . '</dd>'; ./menu_migration.module: $output .= '<dd>' . t('1. Once you have at least one, navigate to Configuration → Development → Menu Migration → Export Types') . '</dd>'; ./menu_migration.module: $output .= '<dd>' . t('1. Once you have at least one, navigate to Configuration → Development → Menu Migration → Import Types') . '</dd>'; ./menu_migration.module: $output .= '<dd>' . t('2. Click on Add export type and fill out the form') . '</dd>'; ./menu_migration.module: $output .= '<dd>' . t('2. Click on Add import type and fill out the form') . '</dd>'; ./menu_migration.module: $output .= '<dd>' . t('3. The Export type name can be anything relevant to you') . '</dd>'; ./menu_migration.module: $output .= '<dd>' . t('3. The Import type name can be anything relevant to you') . '</dd>'; ./menu_migration.module: $output .= '<dd>' . t('4. The machine name will be the ID of the export type and will be used with Drush') . '</dd>'; ./menu_migration.module: $output .= '<dd>' . t('4. The machine name will be the ID of the import type and will be used with Drush') . '</dd>'; ./menu_migration.module: $output .= '<dd>' . t('Export types allow executing menu exports from the database to a selected Destination.') . '</dd>'; ./menu_migration.module: $output .= '<dd>' . t('Exports can be executed from any Export Type entity.') . '</dd>'; ./menu_migration.module: $output .= '<dd>' . t('Import types allow executing menu imports from a selected source to the database.') . '</dd>'; ./menu_migration.module: $output .= '<dd>' . t('Imports can be executed from any Import Type entity.') . '</dd>'; ./menu_migration.module: $output .= '<dd>' . t('You can add as many Export Types as you wish, and you can organize them based on how you plan to use them.') . '</dd>'; ./menu_migration.module: $output .= '<dd>' . t('You can add as many Import Types as you wish, and you can organize them based on how you plan to use them.') . '</dd>'; ./menu_migration.module: $output .= '<dt>' . t('Defining export types') . '</dt>'; ./menu_migration.module: $output .= '<dt>' . t('Defining import types') . '</dt>'; ./menu_migration.permissions.yml: description: 'Access to the Export Types page and perform exports.' ./menu_migration.permissions.yml: description: 'Access to the Import Types page and perform imports.' ./menu_migration.permissions.yml: description: 'Administer Export Types: add, edit, delete, export.' ./menu_migration.permissions.yml: description: 'Administer Import Types: add, edit, delete, import.' ./menu_migration.permissions.yml: title: 'Administer export types' ./menu_migration.permissions.yml: title: 'Administer import types' ./menu_migration.permissions.yml: title: 'Perform export on any Export Types' ./menu_migration.permissions.yml: title: 'Perform import on any Import Types' ./menu_migration.permissions.yml:administer menu migration export types: ./menu_migration.permissions.yml:administer menu migration import types: ./README.md:# Export the Export Type with ID my_export_id, and skip confirmation question. ./README.md:# Export the Export Type with ID my_export_id. ./README.md:# Import the Import Type with ID my_import_id, and skip the confirmation question. ./README.md:# Import the Import Type with ID my_import_id. ./README.md:### Defining an export type ./README.md:### Defining an import type ./README.md:1. Export Types - allows defining export types that can later trigger exports ./README.md:1. Navigate to Configuration → Development → Menu Migration → Export Types ./README.md:1. Navigate to Configuration → Development → Menu Migration → Export Types ./README.md:1. Navigate to Configuration → Development → Menu Migration → Import Types ./README.md:1. Navigate to Configuration → Development → Menu Migration → Import Types ./README.md:2. Click on _Add export type_ and fill out the form ./README.md:2. Click on _Add Import type_ and fill out the form ./README.md:2. Here you have a listing of the available export types ./README.md:2. Here you have a listing of the available import types ./README.md:2. Import Types - allows defining import types that can later trigger imports ./README.md:3. In the _Operations_ column, click on _Export_ for one of the export types ./README.md:3. In the _Operations_ column, click on _Import_ for one of the export types ./README.md:3. The _Export type name_ can be anything relevant to you ./README.md:3. The _Import type name_ can be anything relevant to you ./README.md:4. The machine name will be the ID of the export type and will be used with ./README.md:4. The machine name will be the ID of the Import type and will be used with ./README.md:In order to perform a menu export, an export type needs to be created. ./README.md:In order to perform a menu import, an import type needs to be created. ./README.md:Lists all the available export types that support Drush. ./README.md:Lists all the available import types that support Drush. ./README.md:Performs the export for the given export type ID. Requires confirmation. ./README.md:Performs the import for the given export type ID. Requires confirmation. ./README.md:types and import types. ./README.md:| ` administer menu migration export types ` | Administer export types | Administer Export Types: add, edit, delete, export. Anything related to Export Types. | ./README.md:| ` administer menu migration import types ` | Administer import types | Administer Import Types: add, edit, delete, export. Anything related to Import Types. | ./README.md:| ` perform export on menu migrations ` | Perform export on any Export Types | Access to the Export Types listing page and permission to perform exports. | ./README.md:| ` perform import on menu migrations ` | Perform import on any Import Types | Access to the Export Types listing page and permission to perform imports. | ./src/Commands/MenuMigrationCommands.php: $this->io()->error(dt('The "!arg" Export Type does not support drush. Use drush mmel to see the supported IDs.', [ ./src/Commands/MenuMigrationCommands.php: $this->io()->error(dt('The "!arg" Import Type does not support drush. Use drush mmil to see the supported IDs.', [ ./src/Commands/MenuMigrationCommands.php: $this->io()->error(dt('The "!arg" Export Type does not exist. Please enter a valid Export Type.', ['!arg' => $export_type])); ./src/Commands/MenuMigrationCommands.php: $this->io()->error(dt('The "!arg" Import Type does not exist. Please enter a valid Import Type.', ['!arg' => $import_type])); ./src/Commands/MenuMigrationCommands.php: $this->io()->error(dt('You must specify the ID of the Export Type. Use drush mmel to see the available IDs.')); ./src/Commands/MenuMigrationCommands.php: $this->io()->error(dt('You must specify the ID of the Import Type. Use drush mmil to see the available IDs.')); ./src/Commands/MenuMigrationCommands.php: * If there aren't any export types available, or none of the existing ones ./src/Commands/MenuMigrationCommands.php: * If there aren't any import types available, or none of the existing ones ./src/Entity/ExportType.php: * plural = "@count export types", ./src/Entity/ExportType.php: * singular = "@count export type", ./src/Entity/ExportType.php: * admin_permission = "administer menu migration export types", ./src/Entity/ExportType.php: * label = @Translation("Export type"), ./src/Entity/ExportType.php: * label_collection = @Translation("Export types"), ./src/Entity/ExportType.php: * label_plural = @Translation("export types"), ./src/Entity/ExportType.php: * label_singular = @Translation("export type"), ./src/Entity/ImportType.php: * plural = "@count import types", ./src/Entity/ImportType.php: * singular = "@count import type", ./src/Entity/ImportType.php: * admin_permission = "administer menu migration import types", ./src/Entity/ImportType.php: * label = @Translation("Import type"), ./src/Entity/ImportType.php: * label_collection = @Translation("Import types"), ./src/Entity/ImportType.php: * label_plural = @Translation("import types"), ./src/Entity/ImportType.php: * label_singular = @Translation("import type"), ./src/Form/Entity/ExportTypeAddForm.php: $actions['submit']['#value'] = $this->t('Create new export type'); ./src/Form/Entity/ExportTypeAddForm.php: $this->messenger()->addStatus($this->t('The export type %name was created.', ['%name' => $this->entity->label()])); ./src/Form/Entity/ExportTypeEditForm.php: $this->messenger()->addStatus($this->t('The export type %name was successfully updated.', ['%name' => $this->entity->label()])); ./src/Form/Entity/ExportTypeFormBase.php: '#title' => $this->t('Export type name'), ./src/Form/Entity/ImportTypeAddForm.php: $actions['submit']['#value'] = $this->t('Create new import type'); ./src/Form/Entity/ImportTypeAddForm.php: $this->messenger()->addStatus($this->t('The import type %name was created.', ['%name' => $this->entity->label()])); ./src/Form/Entity/ImportTypeEditForm.php: $this->messenger()->addStatus($this->t('The import type %name was successfully updated.', ['%name' => $this->entity->label()])); ./src/Form/Entity/ImportTypeFormBase.php: '#title' => $this->t('Import type name'),
-
Code comments occurrences of "type"
./assets/js/clipboard.js: * Copies the drush commands to clipboard in the import/export types listings. ./menu_migration.install: * Install the Export & Import configuration entity types. ./src/Access/ImportExportAccessControlHandler.php: * Provides an entity access control handler for export types & import types. ./src/Commands/MenuMigrationCommands.php: * Export the configured menu(s) in the Export Type with my_export_type ID. ./src/Commands/MenuMigrationCommands.php: * Import the configured menu(s) in the Import Type with my_import_type ID. ./src/Commands/MenuMigrationCommands.php: * List all the available export types that are compatible with Drush. ./src/Commands/MenuMigrationCommands.php: * List all the available import types that are compatible with Drush. ./src/Commands/MenuMigrationCommands.php: * The machine name (ID) of the Export Type. ./src/Commands/MenuMigrationCommands.php: * The machine name (ID) of the Import Type. ./src/Commands/MenuMigrationCommands.php: * Exports one or more menu items using the given export type ID. ./src/Commands/MenuMigrationCommands.php: * Imports one or more menu items using the given import type ID. ./src/Commands/MenuMigrationCommands.php: * Lists the available export types. ./src/Commands/MenuMigrationCommands.php: * Lists the available import types. ./src/Commands/MenuMigrationCommands.php: * The Export Type entity storage. ./src/Commands/MenuMigrationCommands.php: * The Import Type entity storage. ./src/Entity/ExportType.php: * The displayed name of the Export Type. ./src/Entity/ExportType.php: * Defines an export type configuration entity. ./src/Entity/ExportTypeInterface.php: * Interface for the Export Type configuration entity. ./src/Entity/ImportType.php: * The displayed name of the Import Type. ./src/Entity/ImportType.php: * Defines an import type configuration entity. ./src/Entity/ImportTypeInterface.php: * Interface for the Import Type configuration entity. ./src/ExportTypeListBuilder.php: * Builds a listing of export type entities. ./src/Form/Entity/ExportTypeAddForm.php: * Provides a form for creating export types. ./src/Form/Entity/ExportTypeDeleteForm.php: * Provides a form for deleting export types. ./src/Form/Entity/ExportTypeEditForm.php: * Provides a form for editing export types. ./src/Form/Entity/ExportTypeExportForm.php: * Provides a form for exporting export types. ./src/Form/Entity/ExportTypeFormBase.php: * The export type entity. ./src/Form/Entity/ExportTypeFormBase.php: * The export type storage. ./src/Form/Entity/ExportTypeFormBase.php: * Provides a form base for creating and editing export types. ./src/Form/Entity/ImportTypeAddForm.php: * Provides a form for creating import types. ./src/Form/Entity/ImportTypeDeleteForm.php: * Provides a form for deleting import types. ./src/Form/Entity/ImportTypeEditForm.php: * Provides a form for editing import types. ./src/Form/Entity/ImportTypeFormBase.php: * The import type entity. ./src/Form/Entity/ImportTypeFormBase.php: * The import type storage. ./src/Form/Entity/ImportTypeFormBase.php: * Provides a form base for creating and editing import types. ./src/Form/Entity/ImportTypeImportForm.php: * Provides a form for importing import types. ./src/ImportExportListBuilderBase.php: * The Export Type or Import Type entity. ./src/ImportExportListBuilderBase.php: * Base entity list builder for import type and export type entities. ./src/ImportExportRouteProvider.php: * Provides HTML routes for export type & import type pages. ./src/ImportTypeListBuilder.php: * Defines a class to build a listing of import type entities. ./src/Plugin/FormatInterface.php: * Gets the mime type of the file for downloadable exports. ./src/Plugin/FormatInterface.php: * know if in the future it might conflict with new types or formats or not. ./src/Plugin/ImportExportActionPluginInterface.php: * This is used as an addition to the import & export types entity forms, ./src/Service/MenuMigrationService.php: * The entity type manager service.
-
Code occurrences of "type"
./.git/hooks/pre-commit.sample:allownonascii=$(git config --type=bool hooks.allownonascii) ./.git/hooks/update.sample: echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 ./.git/hooks/update.sample: newrev_type=$(git cat-file -t $newrev) ./.git/hooks/update.sample: newrev_type=delete ./.git/hooks/update.sample:# --- Check types ./.git/hooks/update.sample:allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) ./.git/hooks/update.sample:allowdeletetag=$(git config --type=bool hooks.allowdeletetag) ./.git/hooks/update.sample:allowmodifytag=$(git config --type=bool hooks.allowmodifytag) ./.git/hooks/update.sample:allowunannotated=$(git config --type=bool hooks.allowunannotated) ./.git/hooks/update.sample:case "$refname","$newrev_type" in ./.git/hooks/update.sample:denycreatebranch=$(git config --type=bool hooks.denycreatebranch) ./assets/js/clipboard.js: tempItem.setAttribute('type','text'); ./assets/js/clipboard.js: * @type {Drupal~behavior} ./composer.json: "type": "drupal-module", ./drush.services.yml: arguments: [ '@entity_type.manager' ] ./menu_migration.info.yml:type: module ./menu_migration.install: $update_manager->installEntityType($entity_type); ./menu_migration.install: if ($entity_type->getProvider() == 'menu_migration') { ./menu_migration.install: foreach (\Drupal::entityTypeManager()->getDefinitions() as $entity_type) { ./menu_migration.links.action.yml: - entity.mm_export_type.collection ./menu_migration.links.action.yml: - entity.mm_import_type.collection ./menu_migration.links.action.yml: route_name: entity.mm_export_type.add_form ./menu_migration.links.action.yml: route_name: entity.mm_import_type.add_form ./menu_migration.links.action.yml:mm_export_type_add_action: ./menu_migration.links.action.yml:mm_import_type_add_action: ./menu_migration.links.menu.yml: route_name: entity.mm_export_type.collection ./menu_migration.links.menu.yml: route_name: entity.mm_import_type.collection ./menu_migration.links.menu.yml:menu_migration.export_types: ./menu_migration.links.menu.yml:menu_migration.import_types: ./menu_migration.links.task.yml: route_name: entity.mm_export_type.collection ./menu_migration.links.task.yml: route_name: entity.mm_import_type.collection ./menu_migration.links.task.yml:menu_migration.export_types: ./menu_migration.links.task.yml:menu_migration.import_types: ./menu_migration.services.yml: arguments: [ '@entity_type.manager', '@menu.link_tree', '@event_dispatcher', '@language_manager', '@logger.factory' ] ./README.md: // Here you add the default file mimetype for exports like download. If ./README.md: public function mimeType() { ./src/Access/ImportExportAccessControlHandler.php: || $account->hasPermission($this->entityType->getAdminPermission())) { ./src/Annotation/MenuMigrationDestination.php: * The human-readable name of the ExportDestination type. ./src/Annotation/MenuMigrationFormat.php: * The human-readable name of the Format type. ./src/Annotation/MenuMigrationSource.php: * The human-readable name of the ImportSource type. ./src/Commands/MenuMigrationCommands.php: $result = $exportType->export(); ./src/Commands/MenuMigrationCommands.php: $result = $importType->import(); ./src/Commands/MenuMigrationCommands.php: '!arg' => $export_type, ./src/Commands/MenuMigrationCommands.php: '!arg' => $import_type, ./src/Commands/MenuMigrationCommands.php: $exportDescription = $exportType->getDestinationPlugin()->getExportDescription(); ./src/Commands/MenuMigrationCommands.php: $exportType->getCommand(), ./src/Commands/MenuMigrationCommands.php: $exportType->id(), ./src/Commands/MenuMigrationCommands.php: $exportType->label(), ./src/Commands/MenuMigrationCommands.php: $importDescription = $importType->getSourcePlugin()->getImportDescription(); ./src/Commands/MenuMigrationCommands.php: $importType->getCommand(), ./src/Commands/MenuMigrationCommands.php: $importType->id(), ./src/Commands/MenuMigrationCommands.php: $importType->label(), ./src/Commands/MenuMigrationCommands.php: implode(', ', $exportType->getMenus()), ./src/Commands/MenuMigrationCommands.php: implode(', ', $importType->getMenus()), ./src/Commands/MenuMigrationCommands.php: $destination = $exportType->getDestinationPlugin(); ./src/Commands/MenuMigrationCommands.php: $source = $importType->getSourcePlugin(); ./src/Commands/MenuMigrationCommands.php: $types[] = [ ./src/Commands/MenuMigrationCommands.php: $types[] = [ ./src/Commands/MenuMigrationCommands.php: if (!$exportType->handleCli()) { ./src/Commands/MenuMigrationCommands.php: if (!$importType->handleCli()) { ./src/Commands/MenuMigrationCommands.php: $exportType = $this->exportTypeStorage->load($export_type); ./src/Commands/MenuMigrationCommands.php: $importType = $this->importTypeStorage->load($import_type); ./src/Commands/MenuMigrationCommands.php: if ($exportType instanceof ExportTypeInterface) { ./src/Commands/MenuMigrationCommands.php: if ($exportType->handleCli()) { ./src/Commands/MenuMigrationCommands.php: if ($importType instanceof ImportTypeInterface) { ./src/Commands/MenuMigrationCommands.php: if ($importType->handleCli()) { ./src/Commands/MenuMigrationCommands.php: $exportTypes = $this->exportTypeStorage->loadMultiple(); ./src/Commands/MenuMigrationCommands.php: $importTypes = $this->importTypeStorage->loadMultiple(); ./src/Commands/MenuMigrationCommands.php: $this->exportTypeStorage = $entityTypeManager->getStorage('mm_export_type'); ./src/Commands/MenuMigrationCommands.php: $this->importTypeStorage = $entityTypeManager->getStorage('mm_import_type'); ./src/Commands/MenuMigrationCommands.php: $this->io()->table($headers, $types); ./src/Commands/MenuMigrationCommands.php: $this->io()->table($headers, $types); ./src/Commands/MenuMigrationCommands.php: $types = []; ./src/Commands/MenuMigrationCommands.php: $types = []; ./src/Commands/MenuMigrationCommands.php: /** @var \Drupal\menu_migration\Entity\ExportTypeInterface[] $exportTypes */ ./src/Commands/MenuMigrationCommands.php: /** @var \Drupal\menu_migration\Entity\ImportTypeInterface[] $importTypes */ ./src/Commands/MenuMigrationCommands.php: foreach ($exportTypes as $exportType) { ./src/Commands/MenuMigrationCommands.php: foreach ($importTypes as $importType) { ./src/Commands/MenuMigrationCommands.php: if (empty($export_type)) { ./src/Commands/MenuMigrationCommands.php: if (empty($import_type)) { ./src/Commands/MenuMigrationCommands.php: * @param string $export_type ./src/Commands/MenuMigrationCommands.php: * @param string $import_type ./src/Commands/MenuMigrationCommands.php: * @usage menu_migration:export my_export_type ./src/Commands/MenuMigrationCommands.php: * @usage menu_migration:import my_import_type ./src/Commands/MenuMigrationCommands.php: protected EntityStorageInterface $exportTypeStorage; ./src/Commands/MenuMigrationCommands.php: protected EntityStorageInterface $importTypeStorage; ./src/Commands/MenuMigrationCommands.php: public function __construct(EntityTypeManagerInterface $entityTypeManager) { ./src/Commands/MenuMigrationCommands.php: public function export(string $export_type = '') { ./src/Commands/MenuMigrationCommands.php: public function import(string $import_type = '') { ./src/Commands/MenuMigrationCommands.php:use Drupal\Core\Entity\EntityTypeManagerInterface; ./src/Commands/MenuMigrationCommands.php:use Drupal\menu_migration\Entity\ExportTypeInterface; ./src/Commands/MenuMigrationCommands.php:use Drupal\menu_migration\Entity\ImportTypeInterface; ./src/Entity/ExportType.php: $config['#export_type'] = $this; ./src/Entity/ExportType.php: * "add" = "Drupal\menu_migration\Form\Entity\ExportTypeAddForm", ./src/Entity/ExportType.php: * "delete" = "Drupal\menu_migration\Form\Entity\ExportTypeDeleteForm", ./src/Entity/ExportType.php: * "edit" = "Drupal\menu_migration\Form\Entity\ExportTypeEditForm", ./src/Entity/ExportType.php: * "export" = "Drupal\menu_migration\Form\Entity\ExportTypeExportForm" ./src/Entity/ExportType.php: * "add-form" = "/admin/config/development/menu-migration/export-types/add", ./src/Entity/ExportType.php: * "collection" = "/admin/config/development/menu-migration/export-types", ./src/Entity/ExportType.php: * "delete-form" = "/admin/config/development/menu-migration/export-types/{mm_export_type}/delete", ./src/Entity/ExportType.php: * "edit-form" = "/admin/config/development/menu-migration/export-types/{mm_export_type}/edit", ./src/Entity/ExportType.php: * "export-form" = "/admin/config/development/menu-migration/export-types/{mm_export_type}/export", ./src/Entity/ExportType.php: * "list_builder" = "Drupal\menu_migration\ExportTypeListBuilder", ./src/Entity/ExportType.php: * id = "mm_export_type", ./src/Entity/ExportType.php: * @ConfigEntityType( ./src/Entity/ExportType.php:class ExportType extends ConfigEntityBase implements ExportTypeInterface { ./src/Entity/ExportTypeInterface.php:interface ExportTypeInterface extends ConfigEntityInterface { ./src/Entity/ImportType.php: $config['#import_type'] = $this; ./src/Entity/ImportType.php: * "add" = "Drupal\menu_migration\Form\Entity\ImportTypeAddForm", ./src/Entity/ImportType.php: * "delete" = "Drupal\menu_migration\Form\Entity\ImportTypeDeleteForm", ./src/Entity/ImportType.php: * "edit" = "Drupal\menu_migration\Form\Entity\ImportTypeEditForm", ./src/Entity/ImportType.php: * "import" = "Drupal\menu_migration\Form\Entity\ImportTypeImportForm" ./src/Entity/ImportType.php: * "add-form" = "/admin/config/development/menu-migration/import-types/add", ./src/Entity/ImportType.php: * "collection" = "/admin/config/development/menu-migration/import-types", ./src/Entity/ImportType.php: * "delete-form" = "/admin/config/development/menu-migration/import-types/{mm_import_type}/delete", ./src/Entity/ImportType.php: * "edit-form" = "/admin/config/development/menu-migration/import-types/{mm_import_type}/edit", ./src/Entity/ImportType.php: * "import-form" = "/admin/config/development/menu-migration/import-types/{mm_import_type}/import", ./src/Entity/ImportType.php: * "list_builder" = "Drupal\menu_migration\ImportTypeListBuilder", ./src/Entity/ImportType.php: * id = "mm_import_type", ./src/Entity/ImportType.php: * @ConfigEntityType( ./src/Entity/ImportType.php:class ImportType extends ConfigEntityBase implements ImportTypeInterface { ./src/Entity/ImportTypeInterface.php:interface ImportTypeInterface extends ConfigEntityInterface { ./src/ExportTypeListBuilder.php: public function buildRow(EntityInterface|ExportTypeInterface $entity) { ./src/ExportTypeListBuilder.php:class ExportTypeListBuilder extends ImportExportListBuilderBase { ./src/ExportTypeListBuilder.php:use Drupal\menu_migration\Entity\ExportTypeInterface; ./src/Form/Entity/ExportTypeAddForm.php:class ExportTypeAddForm extends ExportTypeFormBase { ./src/Form/Entity/ExportTypeDeleteForm.php:class ExportTypeDeleteForm extends EntityDeleteForm {} ./src/Form/Entity/ExportTypeEditForm.php:class ExportTypeEditForm extends ExportTypeFormBase { ./src/Form/Entity/ExportTypeExportForm.php: '#type' => 'container', ./src/Form/Entity/ExportTypeExportForm.php: * @var \Drupal\menu_migration\Entity\ExportType ./src/Form/Entity/ExportTypeExportForm.php:class ExportTypeExportForm extends EntityConfirmFormBase { ./src/Form/Entity/ExportTypeFormBase.php: 'exists' => [$this->exportTypeStorage, 'load'], ./src/Form/Entity/ExportTypeFormBase.php: $container->get('entity_type.manager'), ./src/Form/Entity/ExportTypeFormBase.php: '#type' => 'container', ./src/Form/Entity/ExportTypeFormBase.php: '#type' => 'machine_name', ./src/Form/Entity/ExportTypeFormBase.php: '#type' => 'select', ./src/Form/Entity/ExportTypeFormBase.php: '#type' => 'textfield', ./src/Form/Entity/ExportTypeFormBase.php: $this->exportTypeStorage = $entityTypeManager->getStorage('mm_export_type'); ./src/Form/Entity/ExportTypeFormBase.php: * @var \Drupal\menu_migration\Entity\ExportType ./src/Form/Entity/ExportTypeFormBase.php: protected EntityStorageInterface $exportTypeStorage; ./src/Form/Entity/ExportTypeFormBase.php: public function __construct(ExportDestinationManager $destinationManager, EntityTypeManagerInterface $entityTypeManager) { ./src/Form/Entity/ExportTypeFormBase.php:class ExportTypeFormBase extends EntityForm { ./src/Form/Entity/ExportTypeFormBase.php:use Drupal\Core\Entity\EntityTypeManagerInterface; ./src/Form/Entity/ImportTypeAddForm.php:class ImportTypeAddForm extends ImportTypeFormBase { ./src/Form/Entity/ImportTypeDeleteForm.php:class ImportTypeDeleteForm extends EntityDeleteForm {} ./src/Form/Entity/ImportTypeEditForm.php:class ImportTypeEditForm extends ImportTypeFormBase { ./src/Form/Entity/ImportTypeFormBase.php: 'exists' => [$this->importTypeStorage, 'load'], ./src/Form/Entity/ImportTypeFormBase.php: $container->get('entity_type.manager'), ./src/Form/Entity/ImportTypeFormBase.php: '#type' => 'container', ./src/Form/Entity/ImportTypeFormBase.php: '#type' => 'machine_name', ./src/Form/Entity/ImportTypeFormBase.php: '#type' => 'select', ./src/Form/Entity/ImportTypeFormBase.php: '#type' => 'textfield', ./src/Form/Entity/ImportTypeFormBase.php: $this->importTypeStorage = $entityTypeManager->getStorage('mm_import_type'); ./src/Form/Entity/ImportTypeFormBase.php: * @var \Drupal\menu_migration\Entity\ImportType ./src/Form/Entity/ImportTypeFormBase.php: protected EntityStorageInterface $importTypeStorage; ./src/Form/Entity/ImportTypeFormBase.php: public function __construct(ImportSourceManager $sourceManager, EntityTypeManagerInterface $entityTypeManager) { ./src/Form/Entity/ImportTypeFormBase.php:class ImportTypeFormBase extends EntityForm { ./src/Form/Entity/ImportTypeFormBase.php:use Drupal\Core\Entity\EntityTypeManagerInterface; ./src/Form/Entity/ImportTypeImportForm.php: '#type' => 'container', ./src/Form/Entity/ImportTypeImportForm.php: * @var \Drupal\menu_migration\Entity\ImportType ./src/Form/Entity/ImportTypeImportForm.php:class ImportTypeImportForm extends EntityConfirmFormBase { ./src/ImportExportListBuilderBase.php: $container->get('entity_type.manager')->getStorage($entity_type->id()), ./src/ImportExportListBuilderBase.php: $entity_type, ./src/ImportExportListBuilderBase.php: parent::__construct($entity_type, $storage); ./src/ImportExportListBuilderBase.php: * @param \Drupal\Core\Entity\EntityInterface|\Drupal\menu_migration\Entity\ExportTypeInterface|\Drupal\menu_migration\Entity\ImportTypeInterface $entity ./src/ImportExportListBuilderBase.php: protected function getFormattedEntityCommand(EntityInterface|ExportTypeInterface|ImportTypeInterface $entity) { ./src/ImportExportListBuilderBase.php: public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, ModuleExtensionList $moduleExtensionList, FileUrlGeneratorInterface $fileUrlGenerator) { ./src/ImportExportListBuilderBase.php: public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) { ./src/ImportExportListBuilderBase.php:use Drupal\Core\Entity\EntityTypeInterface; ./src/ImportExportListBuilderBase.php:use Drupal\menu_migration\Entity\ExportTypeInterface; ./src/ImportExportListBuilderBase.php:use Drupal\menu_migration\Entity\ImportTypeInterface; ./src/ImportExportRouteProvider.php: $entity_type_id => ['type' => 'entity:' . $entity_type_id], ./src/ImportExportRouteProvider.php: $entity_type_id => ['type' => 'entity:' . $entity_type_id], ./src/ImportExportRouteProvider.php: '_entity_form' => "{$entity_type_id}.{$operation}", ./src/ImportExportRouteProvider.php: '_entity_form' => "{$entity_type_id}.{$operation}", ./src/ImportExportRouteProvider.php: ->setRequirement('_entity_access', "{$entity_type_id}.{$operation}") ./src/ImportExportRouteProvider.php: ->setRequirement('_entity_access', "{$entity_type_id}.{$operation}") ./src/ImportExportRouteProvider.php: $collection->add("entity.{$entity_type_id}.export_form", $exportFormRoute); ./src/ImportExportRouteProvider.php: $collection->add("entity.{$entity_type_id}.import_form", $importFormRoute); ./src/ImportExportRouteProvider.php: $entity_type_id = $entity_type->id(); ./src/ImportExportRouteProvider.php: $entity_type_id = $entity_type->id(); ./src/ImportExportRouteProvider.php: $route = new Route($entity_type->getLinkTemplate('export-form')); ./src/ImportExportRouteProvider.php: $route = new Route($entity_type->getLinkTemplate('import-form')); ./src/ImportExportRouteProvider.php: if ($entity_type->getFormClass('export')) { ./src/ImportExportRouteProvider.php: if ($entity_type->getFormClass('import')) { ./src/ImportExportRouteProvider.php: $collection = parent::getRoutes($entity_type); ./src/ImportExportRouteProvider.php: $entity_type_id = $entity_type->id(); ./src/ImportExportRouteProvider.php: if ($entity_type->hasLinkTemplate('export-form')) { ./src/ImportExportRouteProvider.php: if ($entity_type->hasLinkTemplate('import-form')) { ./src/ImportExportRouteProvider.php: if ($exportFormRoute = $this->getExportFormRoute($entity_type)) { ./src/ImportExportRouteProvider.php: if ($importFormRoute = $this->getImportFormRoute($entity_type)) { ./src/ImportExportRouteProvider.php: if ($route = parent::getCollectionRoute($entity_type)) { ./src/ImportExportRouteProvider.php: * The entity type. ./src/ImportExportRouteProvider.php: * The entity type. ./src/ImportExportRouteProvider.php: * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type ./src/ImportExportRouteProvider.php: * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type ./src/ImportExportRouteProvider.php: protected function getCollectionRoute(EntityTypeInterface $entity_type) { ./src/ImportExportRouteProvider.php: protected function getExportFormRoute(EntityTypeInterface $entity_type) { ./src/ImportExportRouteProvider.php: protected function getImportFormRoute(EntityTypeInterface $entity_type) { ./src/ImportExportRouteProvider.php: public function getRoutes(EntityTypeInterface $entity_type) { ./src/ImportExportRouteProvider.php:use Drupal\Core\Entity\EntityTypeInterface; ./src/ImportTypeListBuilder.php: public function buildRow(EntityInterface|ImportTypeInterface $entity) { ./src/ImportTypeListBuilder.php: * @see \Drupal\menu_migration\Entity\ImportType ./src/ImportTypeListBuilder.php:class ImportTypeListBuilder extends ImportExportListBuilderBase { ./src/ImportTypeListBuilder.php:use Drupal\menu_migration\Entity\ImportTypeInterface; ./src/Plugin/FormatInterface.php: * A string with the file mime type. ./src/Plugin/FormatInterface.php: public function mimeType(); ./src/Plugin/ImportExportPluginBase.php: '#type' => $this->handleMultiple() ? 'checkboxes' : 'radios', ./src/Plugin/ImportExportPluginBase.php: '#type' => 'select', ./src/Plugin/menu_migration/ExportDestination/Codebase.php: '#type' => 'textfield', ./src/Plugin/menu_migration/ExportDestination/Download.php: ':url' => $exportType->toUrl('collection')->toString(), ./src/Plugin/menu_migration/ExportDestination/Download.php: $exportType = $configuration['#export_type']; ./src/Plugin/menu_migration/ExportDestination/Download.php: $response->headers->set('Content-Type', $this->formatPlugin->mimeType()); ./src/Plugin/menu_migration/ExportDestination/Download.php: /** @var \Drupal\menu_migration\Entity\ExportTypeInterface $exportType */ ./src/Plugin/menu_migration/Format/JsonFormat.php: public function mimeType() { ./src/Plugin/menu_migration/Format/YamlFormat.php: // @todo Not sure what the good mimetype is, using text for now. ./src/Plugin/menu_migration/Format/YamlFormat.php: public function mimeType() { ./src/Plugin/menu_migration/ImportSource/Codebase.php: '#type' => 'textfield', ./src/Plugin/menu_migration/ImportSource/FileUpload.php: '#type' => 'file', ./src/Service/MenuMigrationService.php: $menuLinkContent = $this->entityTypeManager->getStorage('menu_link_content')->load($definition['metadata']['entity_id']); ./src/Service/MenuMigrationService.php: $availableMenus = $this->entityTypeManager->getStorage('menu')->loadMultiple(); ./src/Service/MenuMigrationService.php: $existingItems = $this->entityTypeManager->getStorage('menu_link_content')->loadByProperties(['menu_name' => $menuName]); ./src/Service/MenuMigrationService.php: $this->entityTypeManager = $entityTypeManager; ./src/Service/MenuMigrationService.php: * @var \Drupal\Core\Entity\EntityTypeManagerInterface ./src/Service/MenuMigrationService.php: * The entity type manager service. ./src/Service/MenuMigrationService.php: protected EntityTypeManagerInterface $entityTypeManager; ./src/Service/MenuMigrationService.php: public function __construct(EntityTypeManagerInterface $entityTypeManager, MenuLinkTreeInterface $menuLinkTree, EventDispatcherInterface $eventDispatcher, LanguageManagerInterface $languageManager, LoggerChannelFactoryInterface $logger) { ./src/Service/MenuMigrationService.php:use Drupal\Core\Entity\EntityTypeManagerInterface;
@h_kac: Your comment about the overlap of naming of concepts in WordPress and Drupal, and the confusion it may cause new Drupal users got me thinking: Wouldn't it be great with a page, which relates terms and concepts between WordPress and Drupal?
So I created https://www.drupal.org/docs/contributed-modules/wordpress-migrate/wordpr... →
Anyone should feel free to expand with more sections :)
I created https://www.drupal.org/docs/contributed-modules/wordpress-migrate/wordpr... → but it is now #1 ... perhaps the order can be reversed, so that FAQ is #1? Feel free to add me as admin of https://www.drupal.org/docs/contributed-modules/wordpress-migrate → ...
Nice, it looks great! Thank you very much for implementing this so fast, very impressive.
Perfect, thanks!
This would still be an awesome feature, which is not there yet ... I created ✨ Add support for multiple custom sort criteria labels Active .
Thanks for the flexibility and openness to try it out. As I see it:
- I rarely use the UI for navigation, mostly if I need to check if an update like this works. Otherwise, I always use Admin Toolbar :)
- The Configuration section is already quite crowded with 9 entries in my vanilla Drupal installation ... so keeping it in check is best, as I see it
I forgot to update the configure
key (the one that generates the links in the Extend section and after installing a module with Drush) in menu_migration.info.yml, sorry about that. Maybe you can do it manually, instead of me creating a new issue?
From:
configure: entity.mm_export_type.collection
To:
configure: menu_migration.menu_migration
Great! It could also have been in another column, that would also work well. I only put them together to save a little space. As you also write, only Codebase (config) would have a path, so maybe it would make it slightly easier to make?
I will focus on the other issue of Type to Menu, so feel free to go ahead with this one.
I think I prefer to just show it under /admin/config/development/menu-migration, on the same level as /admin/config/development/configuration, which is the most similar other menu entry, handling configuration export and import ...
I created an MR which does this. What do you think?
I created a child issue 📌 Update documentation, using Menu instead of Type Active .
Great, I really appreciate your openness to changes :)
While creating the issue, my mind also glazed over a few times, having to juggle the different concepts ... which made me realize that while actually coding it, something similar probably was taking place. Naming things are difficult!
But let's keep using "type" in the code, and only update the UI and README, right?
And then doing the documentation when that's in place is a great plan, and I have added it in the Issue Summary.
I can create an MR, but will wait for feedback before proceeding, because "Type" is present many places :)
You're welcome! I am also very grateful that you build and maintain such a wonderful module, it really makes things a lot easier.
About wanting to highlight different scenarios, it is a very valid point, and I did think about that afterwards ... So perhaps using "My menus" and my_menus
both places could work?
It sounds great that adding a pure Drush support might be considered, but if it's too much, nevermind -- it works fine. Though, Drush was originally created partially to automate GUI interaction, so maybe it's possible?
PS. I see now in the Documentation images that YAML says "N/A" under "Drush command", which I believe was also what I saw when it failed for me ... so the reason was probably that I had selected "File upload", wrongly.
You're welcome, thanks for a fast review and commit!
Thanks for a fast reply @bbu23!
You're right, YAML does work also ... I am not sure what went wrong. Thanks for reverting my faulty updates :)
About the documentation: I think that using for example "Main navigation" and machine name main_navigation
for both export and import in the examples will make it easier for users to more easily understand the concept ...
That way, the user can see that you can actually use the same ID, both when exporting and importing, i.e.:
drush menu_migration:export main_navigation
drush menu_migration:import main_navigation
About the new process overall, I think it's all right. I mean, I did like the convenience of previously just being able to run a Drush command, to both export and import a menu, without having to do any configuration. Would that be possible again? If it would take a big effort, then it's not that important, more a nice to have :)
I finally tried the new version and it works great, thanks!
Initially I thought that it was annoying that I had to create exports and imports, but I guess some users want to use a GUI for this ...
Anyway, I still use Drush, but still needed to create exports and imports. I wasn't sure about the naming, like could they have the same machine name, and it turns out they can. So maybe, in the documentation this would be possible, to make it simpler for new users to get started? I left a note in https://www.drupal.org/docs/extending-drupal/contributed-modules/contrib... → .
Also, it seems like only JSON-format is supported for Drush import, not YAML ... maybe this could be added in the README, if it is correct?
Adding tip that Drush only supports JSON-format, not YAML.
Also, I think that using for example "Main navigation" and machine name main_navigation
for both export and import in the examples will make it easier to understand for new users ...
That way you can use the same ID both when exporting and importing, i.e.:
drush menu_migration:export main_navigation
drush menu_migration:import main_navigation
Adding tip that only JSON-format is supported for import.
All the other Lightbox modules listed on Comparison of Lightbox-type modules → are covered by the security advisory policy, except for this one ...
The Status of the Drupal.org security advisory coverage applications is "Needs work" ... but the question is, if it is likely to happen?
I ask, because I think recommended modules included on Comparison of Lightbox-type modules → should be covered by the security advisory policy, but would like to check, before considering removing it from the list.