class LlamaButton

Defines a "LlamaButton" plugin, with a toolbar builder-enabled "llama" feature.

Plugin annotation


@CKEditorPlugin(
  id = "llama_button",
  label = @Translation("Llama Button")
)

Hierarchy

Expanded class hierarchy of LlamaButton

File

drupal/core/modules/ckeditor/tests/modules/lib/Drupal/ckeditor_test/Plugin/CKEditorPlugin/LlamaButton.php, line 23
Contains \Drupal\ckeditor_test\Plugin\CKEditorPlugin\LlamaButton.

Namespace

Drupal\ckeditor_test\Plugin\CKEditorPlugin
View source
class LlamaButton extends Llama implements CKEditorPluginButtonsInterface {

  /**
   * Implements \Drupal\ckeditor\Plugin\CKEditorPluginButtonsInterface::getButtons().
   */
  function getButtons() {
    return array(
      'Llama' => array(
        'label' => t('Insert Lllama'),
      ),
    );
  }

  /**
   * Implements \Drupal\ckeditor\Plugin\CKEditorPluginInterface::getFile().
   */
  function getFile() {
    return drupal_get_path('module', 'ckeditor_test') . '/js/llama_button.js';
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Llama::getConfig public function Implements \Drupal\ckeditor\Plugin\CKEditorPluginInterface::getButtons(). Overrides CKEditorPluginInterface::getConfig
Llama::isInternal function Implements \Drupal\ckeditor\Plugin\CKEditorPluginInterface::isInternal(). Overrides CKEditorPluginInterface::isInternal
LlamaButton::getButtons function Implements \Drupal\ckeditor\Plugin\CKEditorPluginButtonsInterface::getButtons(). Overrides CKEditorPluginButtonsInterface::getButtons
LlamaButton::getFile function Implements \Drupal\ckeditor\Plugin\CKEditorPluginInterface::getFile(). Overrides Llama::getFile
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition.
PluginBase::$pluginId protected property The plugin_id.
PluginBase::getPluginDefinition public function Returns the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition
PluginBase::getPluginId public function Returns the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::__construct public function Constructs a Drupal\Component\Plugin\PluginBase object. 17