Commit a67f54c0 authored by catch's avatar catch

Issue #2668828 by heykarthikwithu, naveenvalecha: Remove EditorEntity aliasing...

Issue #2668828 by heykarthikwithu, naveenvalecha: Remove EditorEntity aliasing in editor & ckeditor module
parent ac415b1f
......@@ -15,7 +15,7 @@
use Drupal\Core\Render\RendererInterface;
use Drupal\editor\Plugin\EditorBase;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\editor\Entity\Editor as EditorEntity;
use Drupal\editor\Entity\Editor;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
......@@ -142,7 +142,7 @@ public function getDefaultSettings() {
/**
* {@inheritdoc}
*/
public function settingsForm(array $form, FormStateInterface $form_state, EditorEntity $editor) {
public function settingsForm(array $form, FormStateInterface $form_state, Editor $editor) {
$settings = $editor->getSettings();
$ckeditor_settings_toolbar = array(
......@@ -259,7 +259,7 @@ public function settingsFormSubmit(array $form, FormStateInterface $form_state)
/**
* {@inheritdoc}
*/
public function getJSSettings(EditorEntity $editor) {
public function getJSSettings(Editor $editor) {
$settings = array();
// Get the settings for all enabled plugins, even the internal ones.
......@@ -367,7 +367,7 @@ public function getLangcodes() {
/**
* {@inheritdoc}
*/
public function getLibraries(EditorEntity $editor) {
public function getLibraries(Editor $editor) {
$libraries = array(
'ckeditor/drupal.ckeditor',
);
......@@ -393,7 +393,7 @@ public function getLibraries(EditorEntity $editor) {
* @return array
* An array containing the "toolbar" configuration.
*/
public function buildToolbarJSSetting(EditorEntity $editor) {
public function buildToolbarJSSetting(Editor $editor) {
$toolbar = array();
$settings = $editor->getSettings();
......@@ -416,7 +416,7 @@ public function buildToolbarJSSetting(EditorEntity $editor) {
* @return array
* An array containing the "contentsCss" configuration.
*/
public function buildContentsCssJSSetting(EditorEntity $editor) {
public function buildContentsCssJSSetting(Editor $editor) {
$css = array(
drupal_get_path('module', 'ckeditor') . '/css/ckeditor-iframe.css',
drupal_get_path('module', 'system') . '/css/components/align.module.css',
......
......@@ -8,8 +8,8 @@
namespace Drupal\editor_test\Plugin\Editor;
use Drupal\Core\Form\FormStateInterface;
use Drupal\editor\Entity\Editor;
use Drupal\editor\Plugin\EditorBase;
use Drupal\editor\Entity\Editor as EditorEntity;
/**
* Defines a Tyrannosaurus-Rex powered text editor for testing purposes.
......@@ -37,7 +37,7 @@ public function getDefaultSettings() {
/**
* {@inheritdoc}
*/
public function settingsForm(array $form, FormStateInterface $form_state, EditorEntity $editor) {
public function settingsForm(array $form, FormStateInterface $form_state, Editor $editor) {
$form['stumpy_arms'] = array(
'#title' => t('Stumpy arms'),
'#type' => 'checkbox',
......@@ -49,7 +49,7 @@ public function settingsForm(array $form, FormStateInterface $form_state, Editor
/**
* {@inheritdoc}
*/
public function getJSSettings(EditorEntity $editor) {
public function getJSSettings(Editor $editor) {
$js_settings = array();
$settings = $editor->getSettings();
if ($settings['stumpy_arms']) {
......@@ -61,7 +61,7 @@ public function getJSSettings(EditorEntity $editor) {
/**
* {@inheritdoc}
*/
public function getLibraries(EditorEntity $editor) {
public function getLibraries(Editor $editor) {
return array(
'editor_test/trex',
);
......
......@@ -8,8 +8,8 @@
namespace Drupal\editor_test\Plugin\Editor;
use Drupal\Core\Form\FormStateInterface;
use Drupal\editor\Entity\Editor;
use Drupal\editor\Plugin\EditorBase;
use Drupal\editor\Entity\Editor as EditorEntity;
/**
* Defines a Unicorn-powered text editor for Drupal (for testing purposes).
......@@ -38,7 +38,7 @@ function getDefaultSettings() {
/**
* {@inheritdoc}
*/
function settingsForm(array $form, FormStateInterface $form_state, EditorEntity $editor) {
function settingsForm(array $form, FormStateInterface $form_state, Editor $editor) {
$form['ponies_too'] = array(
'#title' => t('Pony mode'),
'#type' => 'checkbox',
......@@ -50,7 +50,7 @@ function settingsForm(array $form, FormStateInterface $form_state, EditorEntity
/**
* {@inheritdoc}
*/
function getJSSettings(EditorEntity $editor) {
function getJSSettings(Editor $editor) {
$js_settings = array();
$settings = $editor->getSettings();
if ($settings['ponies_too']) {
......@@ -62,7 +62,7 @@ function getJSSettings(EditorEntity $editor) {
/**
* {@inheritdoc}
*/
public function getLibraries(EditorEntity $editor) {
public function getLibraries(Editor $editor) {
return array(
'editor_test/unicorn',
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment