This repository was archived by the owner on Jan 5, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathEntityEmbedDisplayManagerInterface.php
More file actions
64 lines (55 loc) · 1.68 KB
/
EntityEmbedDisplayManagerInterface.php
File metadata and controls
64 lines (55 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/**
* @file
* Contains \Drupal\entity_embed\EntityEmbedDisplay\EntityEmbedDisplayManagerInterface.
*/
namespace Drupal\entity_embed\EntityEmbedDisplay;
use Drupal\Component\Plugin\PluginManagerInterface;
use Drupal\Core\Entity\EntityInterface;
/**
* Provides an Entity embed display plugin manager.
*
* @see \Drupal\entity_embed\Annotation\EntityEmbedDisplay
* @see \Drupal\entity_embed\EntityEmbedDisplay\EntityEmbedDisplayInterface
*/
interface EntityEmbedDisplayManagerInterface extends PluginManagerInterface {
/**
* The default display plugin.
*
* @var string
*/
const DEFAULT_PLUGIN_ID = 'entity_reference:entity_reference_entity_view';
/**
* Determines plugins whose constraints are satisfied by a set of contexts.
*
* @param array $contexts
* An array of contexts.
*
* @return array
* An array of plugin definitions.
*
* @todo At some point convert this to use ContextAwarePluginManagerTrait
* @see https://drupal.org/node/2277981
*/
public function getDefinitionsForContexts(array $contexts = array());
/**
* Provides a list of plugins that can be used for a certain entity.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* An entity object.
*
* @return array
* An array of valid plugin labels, keyed by plugin ID.
*/
public function getDefinitionOptionsForEntity(EntityInterface $entity);
/**
* Provides a list of plugins that can be used for a certain entity type.
*
* @param string $entity_type
* The entity type id.
*
* @return array
* An array of valid plugin labels, keyed by plugin ID.
*/
public function getDefinitionOptionsForEntityType($entity_type);
}