public function Profile::addAttribute in Linkit 8.4
Adds an attribute to this profile.
Parameters
array $configuration: An array of attribute configuration.
Return value
String The ID of the attribute.
Overrides ProfileInterface::addAttribute
File
- src/
Entity/ Profile.php, line 154 - Contains \Drupal\linkit\Entity\Profile.
Class
- Profile
- Defines the linkit profile entity.
Namespace
Drupal\linkit\EntityCode
public function addAttribute(array $configuration) {
$this
->getAttributes()
->addInstanceId($configuration['id'], $configuration);
return $configuration['id'];
}