Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support content edit form on alert banner with Gin #229

Open
andybroomfield opened this issue Nov 21, 2022 · 0 comments
Open

Support content edit form on alert banner with Gin #229

andybroomfield opened this issue Nov 21, 2022 · 0 comments
Milestone

Comments

@andybroomfield
Copy link
Contributor

Looks like we need to implement a Gin hook to specify our routes.

/**
 * Register routes to apply Gin’s content edit form layout.
 *
 * Leverage this hook to achieve a consistent user interface layout on
 * administrative edit forms, similar to the node edit forms. Any module
 * providing a custom entity type or form mode may wish to implement this
 * hook for their form routes. Please note that not every content entity
 * form route should enable the Gin edit form layout, for example the
 * delete entity form does not need it.
 *
 * @return array
 *   An array of route names.
 *
 * @see GinContentFormHelper->isContentForm()
 * @see hook_gin_content_form_routes_alter()
 */
function hook_gin_content_form_routes() {
  return [
    // Layout a custom node form.
    'entity.node.my_custom_form',

    // Layout a custom entity type edit form.
    'entity.my_type.edit_form',
  ];
}
andybroomfield added a commit that referenced this issue Jun 30, 2024
Fix #229

Implements hook_gin_content_form_routes for both the alert banner creation
and edit form. This makes editing the alert banner like nodes.

Renames the publishing options group meta to auto pick up gin theming.
Moves the revision log and new revision into the meta group
Add a flag if this is the Gin theme, if it is add the extra class to meta
so it is themed like nodes.
@andybroomfield andybroomfield added this to the v1.8 milestone Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant