Mercurial > hg > isophonics-drupal-site
annotate core/modules/ckeditor/src/CKEditorPluginBase.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
| author | Chris Cannam |
|---|---|
| date | Thu, 28 Feb 2019 13:21:36 +0000 |
| parents | 4c8ae668cc8c |
| children |
| rev | line source |
|---|---|
| Chris@0 | 1 <?php |
| Chris@0 | 2 |
| Chris@0 | 3 namespace Drupal\ckeditor; |
| Chris@0 | 4 |
| Chris@0 | 5 use Drupal\Core\Plugin\PluginBase; |
| Chris@0 | 6 use Drupal\editor\Entity\Editor; |
| Chris@0 | 7 |
| Chris@0 | 8 /** |
| Chris@0 | 9 * Defines a base CKEditor plugin implementation. |
| Chris@0 | 10 * |
| Chris@0 | 11 * No other CKEditor plugins can be internal, unless a different CKEditor build |
| Chris@0 | 12 * than the one provided by Drupal core is used. Most CKEditor plugins don't |
| Chris@0 | 13 * need to provide additional settings forms. |
| Chris@0 | 14 * |
| Chris@0 | 15 * This base class assumes that your plugin has buttons that you want to be |
| Chris@0 | 16 * enabled through the toolbar builder UI. It is still possible to also |
| Chris@0 | 17 * implement the CKEditorPluginContextualInterface (for contextual enabling) and |
| Chris@0 | 18 * CKEditorPluginConfigurableInterface interfaces (for configuring plugin |
| Chris@0 | 19 * settings). |
| Chris@0 | 20 * |
| Chris@0 | 21 * NOTE: the Drupal plugin ID should correspond to the CKEditor plugin name. |
| Chris@0 | 22 * |
| Chris@0 | 23 * @see \Drupal\ckeditor\CKEditorPluginInterface |
| Chris@0 | 24 * @see \Drupal\ckeditor\CKEditorPluginButtonsInterface |
| Chris@0 | 25 * @see \Drupal\ckeditor\CKEditorPluginContextualInterface |
| Chris@0 | 26 * @see \Drupal\ckeditor\CKEditorPluginConfigurableInterface |
| Chris@0 | 27 * @see \Drupal\ckeditor\CKEditorPluginManager |
| Chris@0 | 28 * @see \Drupal\ckeditor\Annotation\CKEditorPlugin |
| Chris@0 | 29 * @see plugin_api |
| Chris@0 | 30 */ |
| Chris@0 | 31 abstract class CKEditorPluginBase extends PluginBase implements CKEditorPluginInterface, CKEditorPluginButtonsInterface { |
| Chris@0 | 32 |
| Chris@0 | 33 /** |
| Chris@0 | 34 * {@inheritdoc} |
| Chris@0 | 35 */ |
| Chris@0 | 36 public function isInternal() { |
| Chris@0 | 37 return FALSE; |
| Chris@0 | 38 } |
| Chris@0 | 39 |
| Chris@0 | 40 /** |
| Chris@0 | 41 * {@inheritdoc} |
| Chris@0 | 42 */ |
| Chris@0 | 43 public function getDependencies(Editor $editor) { |
| Chris@0 | 44 return []; |
| Chris@0 | 45 } |
| Chris@0 | 46 |
| Chris@0 | 47 /** |
| Chris@0 | 48 * {@inheritdoc} |
| Chris@0 | 49 */ |
| Chris@0 | 50 public function getLibraries(Editor $editor) { |
| Chris@0 | 51 return []; |
| Chris@0 | 52 } |
| Chris@0 | 53 |
| Chris@0 | 54 } |
