5 * Contains \Drupal\linkit\ProfileInterface.
8 namespace Drupal\linkit;
10 use Drupal\Core\Config\Entity\ConfigEntityInterface;
13 * Provides an interface defining a profile entity.
15 interface ProfileInterface extends ConfigEntityInterface {
18 * Gets the profile description.
21 * The profile description.
23 public function getDescription();
26 * Sets the profile description.
28 * @param string $description
29 * The profile description.
33 public function setDescription($description);
36 * Returns a specific attribute.
38 * @param string $attribute_id
41 * @return \Drupal\linkit\AttributeInterface
42 * The attribute object.
44 public function getAttribute($attribute_id);
47 * Returns the attributes for this profile.
49 * @return \Drupal\linkit\AttributeCollection|\Drupal\linkit\AttributeInterface[]
50 * The attribute collection.
52 public function getAttributes();
55 * Adds an attribute to this profile.
57 * @param array $configuration
58 * An array of attribute configuration.
61 * The ID of the attribute.
63 public function addAttribute(array $configuration);
66 * Removes an attribute from this profile.
68 * @param string $attribute_id
73 public function removeAttribute($attribute_id);
76 * Sets the configuration for an attribute instance.
78 * @param string $attribute_id
79 * The ID of the attribute to set the configuration for.
80 * @param array $configuration
81 * The attribute configuration to set.
85 public function setAttributeConfig($attribute_id, array $configuration);
88 * Returns a specific matcher.
90 * @param string $instance_id
91 * The matcher instance ID.
93 * @return \Drupal\linkit\MatcherInterface
96 public function getMatcher($instance_id);
99 * Returns the matchers for this profile.
101 * @return \Drupal\linkit\MatcherCollection|\Drupal\linkit\MatcherInterface[]
102 * The matcher collection.
104 public function getMatchers();
107 * Adds a matcher to this profile.
109 * @param array $configuration
110 * An array of matcher configuration.
113 * The instance ID of the matcher.
115 public function addMatcher(array $configuration);
118 * Removes a matcher from this profile.
120 * @param \Drupal\linkit\MatcherInterface $matcher
121 * The matcher object.
125 public function removeMatcher(MatcherInterface $matcher);
128 * Sets the configuration for a matcher instance.
130 * @param string $instance_id
131 * The instance ID of the matcher to set the configuration for.
132 * @param array $configuration
133 * The matcher configuration to set.
137 public function setMatcherConfig($instance_id, array $configuration);