Newer
Older
Angie Byron
committed
<?php
/**
* @file
* Contains \Drupal\edit\Plugin\edit\editor\FormEditor.
*/
namespace Drupal\edit\Plugin\edit\editor;
use Drupal\edit\EditorBase;
use Drupal\Component\Annotation\Plugin;
Angie Byron
committed
use Drupal\field\FieldInstance;
/**
* Defines the "form" Create.js PropertyEditor widget.
*
* @Plugin(
* id = "form",
* jsClassName = "formEditEditor",
Angie Byron
committed
* module = "edit"
* )
*/
class FormEditor extends EditorBase {
/**
* Implements \Drupal\edit\EditorInterface::isCompatible().
*/
function isCompatible(FieldInstance $instance, array $items) {
return TRUE;
}
/**
* Implements \Drupal\edit\EditorInterface::getAttachments().
*/
public function getAttachments() {
return array(
'library' => array(
array('edit', 'edit.editorWidget.form'),
Angie Byron
committed
),
);
}
}