You are here

public function GroupInterface::addContent in Group 8

Same name and namespace in other branches
  1. 2.0.x src/Entity/GroupInterface.php \Drupal\group\Entity\GroupInterface::addContent()

Adds a content entity as a group content entity.

Parameters

\Drupal\Core\Entity\ContentEntityInterface $entity: The content entity to add to the group.

string $plugin_id: The ID of the content enabler plugin to add the entity with.

array $values: (optional) Extra values to add to the group content relationship. You cannot overwrite the group ID (gid) or entity ID (entity_id).

1 method overrides GroupInterface::addContent()
Group::addContent in src/Entity/Group.php
Adds a content entity as a group content entity.

File

src/Entity/GroupInterface.php, line 46

Class

GroupInterface
Provides an interface defining a Group entity.

Namespace

Drupal\group\Entity

Code

public function addContent(ContentEntityInterface $entity, $plugin_id, $values = []);