Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
masquerade
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
masquerade
Merge requests
!4
Issue
#915756
: Add masquerade in admin menu and create a page
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Issue
#915756
: Add masquerade in admin menu and create a page
issue/masquerade-915756:915756-add-masquerade-in
into
8.x-2.x
Overview
0
Commits
5
Pipelines
0
Changes
4
Open
Sahal V A
requested to merge
issue/masquerade-915756:915756-add-masquerade-in
into
8.x-2.x
2 years ago
Overview
0
Commits
5
Pipelines
0
Changes
4
Expand
0
0
Merge request reports
Compare
8.x-2.x
version 1
f7c8980c
2 years ago
8.x-2.x (HEAD)
and
latest version
latest version
160861fc
5 commits,
1 year ago
version 1
f7c8980c
4 commits,
2 years ago
4 files
+
74
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
src/Controller/MasqueradeBlockController.php
0 → 100644
+
53
−
0
Options
<?php
namespace
Drupal\masquerade\Controller
;
use
Drupal\Component\Plugin\PluginManagerInterface
;
use
Drupal\Core\Controller\ControllerBase
;
use
Symfony\Component\DependencyInjection\ContainerInterface
;
/**
* Returns responses for Masquerade routes.
*/
class
MasqueradeBlockController
extends
ControllerBase
{
/**
* The plugin.manager.block service.
*
* @var \Drupal\Component\Plugin\PluginManagerInterface
*/
protected
$pluginManagerBlock
;
/**
* The controller constructor.
*
* @param \Drupal\Component\Plugin\PluginManagerInterface $plugin_manager_block
* The plugin.manager.block service.
*/
public
function
__construct
(
PluginManagerInterface
$plugin_manager_block
)
{
$this
->
pluginManagerBlock
=
$plugin_manager_block
;
}
/**
* {@inheritdoc}
*/
public
static
function
create
(
ContainerInterface
$container
)
{
return
new
static
(
$container
->
get
(
'plugin.manager.block'
)
);
}
/**
* Returns the masquerade block.
*/
public
function
getMasqueradeBlock
()
{
// Create a masquerade block instance.
$build
[
'masquerade'
]
=
$this
->
pluginManagerBlock
->
createInstance
(
'masquerade'
)
->
build
();
return
$build
;
}
}
Loading