You are here

public function Group::getContent in Group 8

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

Retrieves all GroupContent entities for the group.

Parameters

string $plugin_id: (optional) A content enabler plugin ID to filter on.

array $filters: (optional) An associative array of extra filters where the keys are property or field names and the values are the value to filter on.

Return value

\Drupal\group\Entity\GroupContentInterface[] A list of GroupContent entities matching the criteria.

Overrides GroupInterface::getContent

2 calls to Group::getContent()
Group::getContentByEntityId in src/Entity/Group.php
Retrieves all GroupContent entities for a specific entity.
Group::getContentEntities in src/Entity/Group.php
Retrieves all group content for the group.

File

src/Entity/Group.php, line 163

Class

Group
Defines the Group entity.

Namespace

Drupal\group\Entity

Code

public function getContent($plugin_id = NULL, $filters = []) {
  return $this
    ->groupContentStorage()
    ->loadByGroup($this, $plugin_id, $filters);
}