3 namespace Drupal\embed;
5 use Drupal\Core\Config\Entity\ConfigEntityInterface;
8 * Provides an interface defining a embed button entity.
10 interface EmbedButtonInterface extends ConfigEntityInterface {
13 * Returns the associated embed type.
16 * Machine name of the embed type.
18 public function getTypeId();
21 * Returns the label of the associated embed type.
24 * Human readable label of the embed type.
26 public function getTypeLabel();
29 * Returns the plugin of the associated embed type.
31 * @return \Drupal\embed\EmbedType\EmbedTypeInterface
32 * The plugin of the embed type.
34 public function getTypePlugin();
37 * Gets the value of an embed type setting.
41 * @param mixed $default
47 public function getTypeSetting($key, $default = NULL);
50 * Gets all embed type settings.
53 * An array of key-value pairs.
55 public function getTypeSettings();
58 * Returns the button's icon file.
60 * @return \Drupal\file\FileInterface
61 * The file entity of the button icon.
63 public function getIconFile();
66 * Returns the URL of the button's icon.
68 * If no icon file is associated with this Embed Button entity, the embed type
69 * plugin's default icon is used.
72 * The URL of the button icon.
74 public function getIconUrl();