public function GroupContentStorageInterface::createForEntityInGroup in Group 8
Same name and namespace in other branches
- 2.0.x src/Entity/Storage/GroupContentStorageInterface.php \Drupal\group\Entity\Storage\GroupContentStorageInterface::createForEntityInGroup()
Creates a GroupContent entity for placing a content entity in a group.
Parameters
\Drupal\Core\Entity\ContentEntityInterface $entity: The content entity to add to the group.
\Drupal\group\Entity\GroupInterface $group: The group to add the content entity to.
string $plugin_id: The ID of the content enabler plugin to add the entity with.
array $values: (optional) Extra values to add to the GroupContent entity.
Return value
\Drupal\group\Entity\GroupContentInterface A new GroupContent entity.
1 method overrides GroupContentStorageInterface::createForEntityInGroup()
- GroupContentStorage::createForEntityInGroup in src/
Entity/ Storage/ GroupContentStorage.php - Creates a GroupContent entity for placing a content entity in a group.
File
- src/
Entity/ Storage/ GroupContentStorageInterface.php, line 29
Class
- GroupContentStorageInterface
- Defines an interface for group content entity storage classes.
Namespace
Drupal\group\Entity\StorageCode
public function createForEntityInGroup(ContentEntityInterface $entity, GroupInterface $group, $plugin_id, $values = []);