Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
panels_breadcrumbs
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
panels_breadcrumbs
Commits
65e9122c
Commit
65e9122c
authored
10 months ago
by
Viktor Holovachek
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3288961
- Drupal 10
parent
92eb579c
No related branches found
No related tags found
1 merge request
!1
Issue #3288961 - Drupal 10
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
panels_breadcrumbs.info.yml
+1
-3
1 addition, 3 deletions
panels_breadcrumbs.info.yml
panels_breadcrumbs.module
+10
-7
10 additions, 7 deletions
panels_breadcrumbs.module
src/Wizard/PanelsBreadcrumbsEditWizard.php
+25
-0
25 additions, 0 deletions
src/Wizard/PanelsBreadcrumbsEditWizard.php
with
36 additions
and
10 deletions
panels_breadcrumbs.info.yml
+
1
−
3
View file @
65e9122c
...
...
@@ -2,10 +2,8 @@ name: Panels Breadcrumbs
description
:
'
Provides
panels
breadcrumbs
functionality.'
type
:
module
package
:
Panels
core
:
8.x
core_version_requirement
:
^8 || ^9
core_version_requirement
:
^9.4 || ^10
dependencies
:
-
ctools:ctools
-
page_manager:page_manager_ui
-
token:token
This diff is collapsed.
Click to expand it.
panels_breadcrumbs.module
+
10
−
7
View file @
65e9122c
...
...
@@ -5,16 +5,19 @@
* Module file for panels breadcrumbs module.
*/
use
Drupal\panels_breadcrumbs
\
Form\PageVariant
Breadcrumbs
Form
;
use
Drupal\panels_breadcrumbs
\
Wizard\Panels
Breadcrumbs
EditWizard
;
/**
* Implements hook_
page_manager_variant_operations_alter
().
* Implements hook_
entity_type_build
().
*/
function
panels_breadcrumbs_page_manager_variant_operations_alter
(
&
$operations
)
{
$operations
[
'breadcrumbs'
]
=
[
'title'
=>
t
(
'Breadcrumbs'
),
'form'
=>
PageVariantBreadcrumbsForm
::
class
,
];
function
panels_breadcrumbs_entity_type_build
(
array
&
$entity_types
)
{
/** @var $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */
if
(
isset
(
$entity_types
[
'page'
]))
{
$classes
=
$entity_types
[
'page'
]
->
getHandlerClasses
();
$classes
[
'wizard'
][
'edit'
]
=
PanelsBreadcrumbsEditWizard
::
class
;
$entity_types
[
'page'
]
->
setHandlerClass
(
'wizard'
,
$classes
[
'wizard'
]);
}
}
/**
...
...
This diff is collapsed.
Click to expand it.
src/Wizard/PanelsBreadcrumbsEditWizard.php
0 → 100644
+
25
−
0
View file @
65e9122c
<?php
namespace
Drupal\panels_breadcrumbs\Wizard
;
use
Drupal\page_manager
\PageVariantInterface
;
use
Drupal\page_manager_ui
\Wizard\PageEditWizard
;
use
Drupal\panels_breadcrumbs
\Form\PageVariantBreadcrumbsForm
;
class
PanelsBreadcrumbsEditWizard
extends
PageEditWizard
{
/**
* {@inheritdoc}
*/
protected
function
getVariantOperations
(
PageVariantInterface
$page_variant
,
$cached_values
)
{
$operations
=
parent
::
getVariantOperations
(
$page_variant
,
$cached_values
);
$operations
[
'breadcrumbs'
]
=
[
'title'
=>
$this
->
t
(
'Breadcrumbs'
),
'form'
=>
PageVariantBreadcrumbsForm
::
class
,
];
return
$operations
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment