You are here

protected function DrupalEntity::getButton in Entity Embed 8

Build the information about the specific button.

Parameters

\Drupal\embed\EmbedButtonInterface $embed_button: The embed button.

Return value

array The array for use with getButtons().

Overrides EmbedCKEditorPluginBase::getButton

File

src/Plugin/CKEditorPlugin/DrupalEntity.php, line 24

Class

DrupalEntity
Defines the "drupalentity" plugin.

Namespace

Drupal\entity_embed\Plugin\CKEditorPlugin

Code

protected function getButton(EmbedButtonInterface $embed_button) {
  $button = parent::getButton($embed_button);
  $button['entity_type'] = $embed_button
    ->getTypeSetting('entity_type');
  return $button;
}