You are here

public static function OpignoGroupManagedContent::loadByGroupId in Opigno group manager 8

Same name and namespace in other branches
  1. 3.x src/Entity/OpignoGroupManagedContent.php \Drupal\opigno_group_manager\Entity\OpignoGroupManagedContent::loadByGroupId()

Load the contents linked to a specific group.

Parameters

int $group_id: The Group entity ID.

Return value

array|\Drupal\Core\Entity\EntityInterface[]|self[] Group managed content object.

Throws

\Drupal\Component\Plugin\Exception\PluginNotFoundException

3 calls to OpignoGroupManagedContent::loadByGroupId()
OpignoGroupManagedContent::getFirstStep in src/Entity/OpignoGroupManagedContent.php
Returns first step.
OpignoGroupManagedContent::getSuccessfulRequiredActvities in src/Entity/OpignoGroupManagedContent.php
Returns successful required activities array.
opigno_group_manager_entity_delete in ./opigno_group_manager.module
Implements hook_entity_delete().

File

src/Entity/OpignoGroupManagedContent.php, line 431

Class

OpignoGroupManagedContent
Defines the Opigno Group Content entity.

Namespace

Drupal\opigno_group_manager\Entity

Code

public static function loadByGroupId($group_id) {
  try {
    return self::loadByProperties([
      'group_id' => $group_id,
    ]);
  } catch (InvalidPluginDefinitionException $e) {
    return [];
  }
}