You are here

public function GroupContentStorageInterface::createForEntityInGroup in Group 2.0.x

Same name and namespace in other branches
  1. 8 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 group relation 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\Storage

Code

public function createForEntityInGroup(ContentEntityInterface $entity, GroupInterface $group, $plugin_id, $values = []);