Commit ba80bc31 authored by alexpott's avatar alexpott
Browse files

Issue #2006278 by Wim Leers: Remove leftover 'module' annotation keys and...

Issue #2006278 by Wim Leers: Remove leftover 'module' annotation keys and plugin manager processDefinition() to deal with disabled modules during tests.
parent c06bf841
......@@ -32,11 +32,4 @@ class CKEditorPlugin extends Plugin {
*/
public $label;
/**
* The name of the module providing the CKEditor plugin.
*
* @var string
*/
public $module;
}
......@@ -18,8 +18,7 @@
*
* @CKEditorPlugin(
* id = "internal",
* label = @Translation("CKEditor core"),
* module = "ckeditor"
* label = @Translation("CKEditor core")
* )
*/
class Internal extends CKEditorPluginBase {
......
......@@ -19,8 +19,7 @@
*
* @CKEditorPlugin(
* id = "stylescombo",
* label = @Translation("Styles dropdown"),
* module = "ckeditor"
* label = @Translation("Styles dropdown")
* )
*/
class StylesCombo extends CKEditorPluginBase implements CKEditorPluginConfigurableInterface {
......
......@@ -19,7 +19,6 @@
* @Editor(
* id = "ckeditor",
* label = @Translation("CKEditor"),
* module = "ckeditor",
* supports_inline_editing = TRUE
* )
*/
......
......@@ -27,8 +27,7 @@
*
* @CKEditorPlugin(
* id = "llama",
* label = @Translation("Llama"),
* module = "ckeditor_test"
* label = @Translation("Llama")
* )
*/
class Llama extends PluginBase implements CKEditorPluginInterface {
......
......@@ -17,8 +17,7 @@
*
* @CKEditorPlugin(
* id = "llama_button",
* label = @Translation("Llama Button"),
* module = "ckeditor_test"
* label = @Translation("Llama Button")
* )
*/
class LlamaButton extends Llama implements CKEditorPluginButtonsInterface {
......
......@@ -18,8 +18,7 @@
*
* @CKEditorPlugin(
* id = "llama_contextual",
* label = @Translation("Contextual Llama"),
* module = "ckeditor_test"
* label = @Translation("Contextual Llama")
* )
*/
class LlamaContextual extends Llama implements CKEditorPluginContextualInterface {
......
......@@ -21,8 +21,7 @@
*
* @CKEditorPlugin(
* id = "llama_contextual_and_button",
* label = @Translation("Contextual Llama With Button"),
* module = "ckeditor_test"
* label = @Translation("Contextual Llama With Button")
* )
*/
class LlamaContextualAndButton extends Llama implements CKEditorPluginContextualInterface, CKEditorPluginButtonsInterface, CKEditorPluginConfigurableInterface {
......
......@@ -15,8 +15,7 @@
* Defines the direct editor.
*
* @InPlaceEditor(
* id = "direct",
* module = "edit"
* id = "direct"
* )
*/
class DirectEditor extends EditorBase {
......
......@@ -15,8 +15,7 @@
* Defines the form editor.
*
* @InPlaceEditor(
* id = "form",
* module = "edit"
* id = "form"
* )
*/
class FormEditor extends EditorBase {
......
......@@ -31,23 +31,9 @@ class InPlaceEditorManager extends PluginManagerBase {
public function __construct(\Traversable $namespaces) {
$annotation_namespaces = array('Drupal\edit\Annotation' => $namespaces['Drupal\edit']);
$this->discovery = new AnnotatedClassDiscovery('InPlaceEditor', $namespaces, $annotation_namespaces, 'Drupal\edit\Annotation\InPlaceEditor');
$this->discovery = new ProcessDecorator($this->discovery, array($this, 'processDefinition'));
$this->discovery = new AlterDecorator($this->discovery, 'edit_editor');
$this->discovery = new CacheDecorator($this->discovery, 'edit:editor');
$this->factory = new DefaultFactory($this->discovery);
}
/**
* Overrides \Drupal\Component\Plugin\PluginManagerBase::processDefinition().
*/
public function processDefinition(&$definition, $plugin_id) {
parent::processDefinition($definition, $plugin_id);
// @todo Remove this check once http://drupal.org/node/1780396 is resolved.
if (!module_exists($definition['module'])) {
$definition = NULL;
return;
}
}
}
......@@ -16,8 +16,7 @@
*
* @InPlaceEditor(
* id = "wysiwyg",
* alternativeTo = {"direct"},
* module = "edit_test"
* alternativeTo = {"direct"}
* )
*/
class WysiwygEditor extends EditorBase {
......
......@@ -32,13 +32,6 @@ class Editor extends Plugin {
*/
public $label;
/**
* The name of the module providing the editor plugin.
*
* @var string
*/
public $module;
/**
* Whether the editor supports the inline editing provided by the Edit module.
*
......
......@@ -31,8 +31,7 @@
* @code
* @Editor(
* id = "myeditor",
* label = @Translation("My Editor"),
* module = "mymodule"
* label = @Translation("My Editor")
* )
* @endcode
*/
......
......@@ -18,8 +18,7 @@
*
* @InPlaceEditor(
* id = "editor",
* alternativeTo = {"direct"},
* module = "editor"
* alternativeTo = {"direct"}
* )
*/
class Editor extends PluginBase implements EditPluginInterface {
......
......@@ -18,7 +18,6 @@
* @Editor(
* id = "unicorn",
* label = @Translation("Unicorn Editor"),
* module = "editor_test",
* supports_inline_editing = TRUE
* )
*/
......
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