You are here

class HubspotForms in Hubspot forms 8

Same name in this branch
  1. 8 src/Plugin/Filter/HubspotForms.php \Drupal\hubspot_forms\Plugin\Filter\HubspotForms
  2. 8 src/Plugin/CKEditorPlugin/HubspotForms.php \Drupal\hubspot_forms\Plugin\CKEditorPlugin\HubspotForms

Defines the "HubspotForms" plugin.

Plugin annotation


@CKEditorPlugin(
  id = "hubspot_forms",
  label = @Translation("Hubspot Forms")
)

Hierarchy

Expanded class hierarchy of HubspotForms

File

src/Plugin/CKEditorPlugin/HubspotForms.php, line 18

Namespace

Drupal\hubspot_forms\Plugin\CKEditorPlugin
View source
class HubspotForms extends PluginBase implements CKEditorPluginInterface, CKEditorPluginButtonsInterface {

  /**
   * {@inheritdoc}
   */
  public function getDependencies(Editor $editor) {
    return [];
  }

  /**
   * {@inheritdoc}
   */
  public function getLibraries(Editor $editor) {
    return [
      'core/drupal.ajax',
    ];
  }

  /**
   * {@inheritdoc}
   */
  public function isInternal() {
    return FALSE;
  }

  /**
   * {@inheritdoc}
   */
  public function getFile() {
    return drupal_get_path('module', 'hubspot_forms') . '/assets/hubspot_forms.js';
  }

  /**
   * {@inheritdoc}
   */
  public function getButtons() {
    return [
      'hubspot_forms' => [
        'label' => t('Hubspot Forms'),
        'image' => drupal_get_path('module', 'hubspot_forms') . '/assets/icon.png',
      ],
    ];
  }

  /**
   * {@inheritdoc}
   */
  public function getConfig(Editor $editor) {
    return [
      'hubspot_forms_dialog_title' => t('Hubspot Forms'),
    ];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
HubspotForms::getButtons public function Returns the buttons that this plugin provides, along with metadata. Overrides CKEditorPluginButtonsInterface::getButtons
HubspotForms::getConfig public function Returns the additions to CKEDITOR.config for a specific CKEditor instance. Overrides CKEditorPluginInterface::getConfig
HubspotForms::getDependencies public function Returns a list of plugins this plugin requires. Overrides CKEditorPluginInterface::getDependencies
HubspotForms::getFile public function Returns the Drupal root-relative file path to the plugin JavaScript file. Overrides CKEditorPluginInterface::getFile
HubspotForms::getLibraries public function Returns a list of libraries this plugin requires. Overrides CKEditorPluginInterface::getLibraries
HubspotForms::isInternal public function Indicates if this plugin is part of the optimized CKEditor build. Overrides CKEditorPluginInterface::isInternal
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition. 1
PluginBase::$pluginId protected property The plugin_id.
PluginBase::DERIVATIVE_SEPARATOR constant A string which is used to separate base plugin IDs from the derivative ID.
PluginBase::getBaseId public function Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface::getBaseId
PluginBase::getDerivativeId public function Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface::getDerivativeId
PluginBase::getPluginDefinition public function Gets the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition 3
PluginBase::getPluginId public function Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::isConfigurable public function Determines if the plugin is configurable.
PluginBase::__construct public function Constructs a \Drupal\Component\Plugin\PluginBase object. 92