3 namespace Drupal\paragraphs;
5 use Drupal\Core\Config\Entity\ConfigEntityInterface;
8 * Provides an interface defining a ParagraphsType entity.
10 interface ParagraphsTypeInterface extends ConfigEntityInterface {
13 * Returns the ordered collection of feature plugin instances.
15 * @return \Drupal\paragraphs\ParagraphsBehaviorCollection
16 * The behavior plugins collection.
18 public function getBehaviorPlugins();
21 * Returns an individual plugin instance.
23 * @param string $instance_id
24 * The ID of a behavior plugin instance to return.
26 * @return \Drupal\paragraphs\ParagraphsBehaviorInterface
27 * A specific feature plugin instance.
29 public function getBehaviorPlugin($instance_id);
32 * Retrieves all the enabled plugins.
34 * @return \Drupal\paragraphs\ParagraphsBehaviorInterface[]
35 * Array of the enabled plugins as instances.
37 public function getEnabledBehaviorPlugins();
40 * Returns the icon file entity.
42 * @return \Drupal\file\FileInterface|bool
43 * The icon's file entity or FALSE if icon does not exist.
45 public function getIconFile();
48 * Returns the icon's URL.
51 * The icon's URL or FALSE if icon does not exits.
53 public function getIconUrl();
56 * Gets the description.
59 * The description of this paragraph type.
61 public function getDescription();
64 * Returns TRUE if $plugin_id is enabled on this ParagraphType Entity.
66 * @param string $plugin_id
67 * The plugin id, as specified in the plugin annotation details.
70 * TRUE if the plugin is enabled, FALSE otherwise.
72 public function hasEnabledBehaviorPlugin($plugin_id);