Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nbsp
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
nbsp
Merge requests
!11
fix som PHPStan deprecations
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
fix som PHPStan deprecations
30x/phpstan
into
3.0.x
Overview
0
Commits
3
Pipelines
9
Changes
8
Merged
Kevin Wenger
requested to merge
30x/phpstan
into
3.0.x
1 year ago
Overview
0
Commits
3
Pipelines
9
Changes
8
Expand
0
0
Merge request reports
Compare
3.0.x
version 7
842b49f5
1 year ago
version 6
b23ab267
1 year ago
version 5
b4e0f770
1 year ago
version 4
613f5b35
1 year ago
version 3
69af67cc
1 year ago
version 2
b5becae0
1 year ago
version 1
c23ae206
1 year ago
3.0.x (base)
and
latest version
latest version
77571415
3 commits,
1 year ago
version 7
842b49f5
2 commits,
1 year ago
version 6
b23ab267
2 commits,
1 year ago
version 5
b4e0f770
1 commit,
1 year ago
version 4
613f5b35
1 commit,
1 year ago
version 3
69af67cc
1 commit,
1 year ago
version 2
b5becae0
1 commit,
1 year ago
version 1
c23ae206
1 commit,
1 year ago
8 files
+
21
−
140
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
8
Search (e.g. *.vue) (Ctrl+P)
src/Plugin/CKEditorPlugin/Nbsp.php deleted
100644 → 0
+
0
−
128
Options
<?php
declare
(
strict_types
=
1
);
namespace
Drupal\nbsp\Plugin\CKEditorPlugin
;
use
Drupal\ckeditor\CKEditorPluginBase
;
use
Drupal\ckeditor\CKEditorPluginButtonsInterface
;
use
Drupal\ckeditor\CKEditorPluginCssInterface
;
use
Drupal\ckeditor\CKEditorPluginInterface
;
use
Drupal\Core\Extension\ModuleExtensionList
;
use
Drupal\Core\File\FileUrlGeneratorInterface
;
use
Drupal\Core\Plugin\ContainerFactoryPluginInterface
;
use
Drupal\editor\Entity\Editor
;
use
Symfony\Component\DependencyInjection\ContainerInterface
;
/**
* Defines the "NBSP" plugin.
*
* Plugin to insert a non-breaking space ( ) into the content
* by pressing Ctrl+Space or using the provided button.
*
* @CKEditorPlugin(
* id = "nbsp",
* label = @Translation("Non-breaking space"),
* module = "nbsp"
* )
*/
class
Nbsp
extends
CKEditorPluginBase
implements
ContainerFactoryPluginInterface
,
CKEditorPluginInterface
,
CKEditorPluginButtonsInterface
,
CKEditorPluginCssInterface
{
/**
* The module extension list.
*
* @var \Drupal\Core\Extension\ModuleExtensionList
*/
protected
ModuleExtensionList
$moduleExtensionList
;
/**
* The File URL Generator.
*
* @var \Drupal\Core\File\FileUrlGeneratorInterface
*/
protected
FileUrlGeneratorInterface
$fileUrlGenerator
;
/**
* Constructs a new DrupalMedia plugin object.
*
* @param array $configuration
* A configuration array containing information about the plugin instance.
* @param string $plugin_id
* The plugin_id for the plugin instance.
* @param array $plugin_definition
* The plugin implementation definition.
* @param \Drupal\Core\Extension\ModuleExtensionList $extensionListModule
* The module extension list.
* @param \Drupal\Core\File\FileUrlGeneratorInterface $fileUrlGenerator
* The file Url generator.
*/
public
function
__construct
(
array
$configuration
,
$plugin_id
,
array
$plugin_definition
,
ModuleExtensionList
$extensionListModule
,
FileUrlGeneratorInterface
$fileUrlGenerator
)
{
parent
::
__construct
(
$configuration
,
$plugin_id
,
$plugin_definition
);
$this
->
moduleExtensionList
=
$extensionListModule
;
$this
->
fileUrlGenerator
=
$fileUrlGenerator
;
}
/**
* {@inheritdoc}
*/
public
static
function
create
(
ContainerInterface
$container
,
array
$configuration
,
$plugin_id
,
$plugin_definition
)
{
return
new
static
(
$configuration
,
$plugin_id
,
$plugin_definition
,
$container
->
get
(
'extension.list.module'
),
$container
->
get
(
'file_url_generator'
)
);
}
/**
* {@inheritdoc}
*/
public
function
getDependencies
(
Editor
$editor
)
{
return
[];
}
/**
* {@inheritdoc}
*/
public
function
isInternal
()
{
return
FALSE
;
}
/**
* {@inheritdoc}
*/
public
function
getConfig
(
Editor
$editor
)
{
return
[
'NbspImageIcon'
=>
$this
->
fileUrlGenerator
->
generateString
(
$this
->
moduleExtensionList
->
getPath
(
'nbsp'
)
.
'/icons/nbsp.png'
),
];
}
/**
* {@inheritdoc}
*/
public
function
getFile
()
{
return
$this
->
moduleExtensionList
->
getPath
(
'nbsp'
)
.
'/js/nbsp.js'
;
}
/**
* {@inheritdoc}
*/
public
function
getButtons
()
{
return
[
'DrupalNbsp'
=>
[
'label'
=>
$this
->
t
(
'Non-breaking space'
),
'image'
=>
$this
->
moduleExtensionList
->
getPath
(
'nbsp'
)
.
'/icons/nbsp.png'
,
],
];
}
/**
* {@inheritdoc}
*/
public
function
getCssFiles
(
Editor
$editor
)
{
return
[
$this
->
moduleExtensionList
->
getPath
(
'nbsp'
)
.
'/css/ckeditor.nbsp.css'
];
}
}
Loading