Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uw_cfg_common
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WCMS
uw_cfg_common
Commits
6ef84561
Commit
6ef84561
authored
3 years ago
by
Tyler Struyk
Committed by
l26yan
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-5160: Remove ckeditor.link library in favour for anchor link 3.0.x solution
parent
a6f60a01
No related branches found
No related tags found
1 merge request
!174
ISTWCMS-5160: Remove ckeditor.link library in favour for anchor link 3.0.x solution
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Plugin/CKEditorPlugin/LinkPlugin.php
+0
-110
0 additions, 110 deletions
src/Plugin/CKEditorPlugin/LinkPlugin.php
uw_cfg_common.info.yml
+1
-0
1 addition, 0 deletions
uw_cfg_common.info.yml
with
1 addition
and
110 deletions
src/Plugin/CKEditorPlugin/LinkPlugin.php
deleted
100644 → 0
+
0
−
110
View file @
a6f60a01
<?php
namespace
Drupal\uw_cfg_common\Plugin\CKEditorPlugin
;
use
Drupal\ckeditor\CKEditorPluginBase
;
use
Drupal\Core\Asset\LibrariesDirectoryFileFinder
;
use
Drupal\Core\Plugin\ContainerFactoryPluginInterface
;
use
Drupal\editor\Entity\Editor
;
use
Symfony\Component\DependencyInjection\ContainerInterface
;
/**
* Defines the "link" plugin.
*
* @CKEditorPlugin(
* id = "link",
* label = @Translation("link")
* )
*/
class
LinkPlugin
extends
CKEditorPluginBase
implements
ContainerFactoryPluginInterface
{
/**
* Library file finder.
*
* @var \Drupal\Core\Asset\LibrariesDirectoryFileFinder
*/
protected
$libFileFinder
;
/**
* Constructs a BlockComponentRenderArray 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 mixed $plugin_definition
* The plugin implementation definition.
* @param \Drupal\Core\Asset\LibrariesDirectoryFileFinder $libFileFinder
* The library file finder.
*/
public
function
__construct
(
array
$configuration
,
$plugin_id
,
$plugin_definition
,
LibrariesDirectoryFileFinder
$libFileFinder
)
{
parent
::
__construct
(
$configuration
,
$plugin_id
,
$plugin_definition
);
$this
->
libFileFinder
=
$libFileFinder
;
}
/**
* {@inheritdoc}
*/
public
static
function
create
(
ContainerInterface
$container
,
array
$configuration
,
$plugin_id
,
$plugin_definition
)
{
return
new
static
(
$configuration
,
$plugin_id
,
$plugin_definition
,
$container
->
get
(
'library.libraries_directory_file_finder'
));
}
/**
* {@inheritdoc}
*/
public
function
getDependencies
(
Editor
$editor
)
{
return
[
'fakeobjects'
,
];
}
/**
* {@inheritdoc}
*/
public
function
getLibraries
(
Editor
$editor
)
{
return
[];
}
/**
* {@inheritdoc}
*/
public
function
getConfig
(
Editor
$editor
)
{
return
[];
}
/**
* {@inheritdoc}
*/
public
function
getButtons
()
{
$libraryUrl
=
$this
->
libFileFinder
->
find
(
'ckeditor.link'
);
return
[
'Link'
=>
[
'label'
=>
$this
->
t
(
'Link'
),
'image'
=>
$libraryUrl
.
'/icons/link.png'
,
],
'Unlink'
=>
[
'label'
=>
$this
->
t
(
'Unlink'
),
'image'
=>
$libraryUrl
.
'/icons/unlink.png'
,
],
'Anchor'
=>
[
'label'
=>
$this
->
t
(
'Anchor'
),
'image'
=>
$libraryUrl
.
'/icons/anchor.png'
,
],
];
}
/**
* {@inheritdoc}
*/
public
function
getFile
()
{
return
$this
->
libFileFinder
->
find
(
'ckeditor.link'
)
.
'/plugin.js'
;
}
/**
* {@inheritdoc}
*/
public
function
isInternal
()
{
return
FALSE
;
}
}
This diff is collapsed.
Click to expand it.
uw_cfg_common.info.yml
+
1
−
0
View file @
6ef84561
...
@@ -4,6 +4,7 @@ type: module
...
@@ -4,6 +4,7 @@ type: module
core_version_requirement
:
'
^8.9
||
^9'
core_version_requirement
:
'
^8.9
||
^9'
dependencies
:
dependencies
:
-
'
composer_deploy:composer_deploy'
-
'
composer_deploy:composer_deploy'
-
'
drupal:anchor_link'
-
'
drupal:better_exposed_filters'
-
'
drupal:better_exposed_filters'
-
'
drupal:block_content'
-
'
drupal:block_content'
-
'
drupal:block_list_override'
-
'
drupal:block_list_override'
...
...
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