protected function OgResolvedGroupCollection::generateKey in Organic groups 8
Generates a key that can be used to identify the given group.
Parameters
\Drupal\Core\Entity\ContentEntityInterface $group: The group for which to generate the key.
Return value
string The key.
3 calls to OgResolvedGroupCollection::generateKey()
- OgResolvedGroupCollection::addGroup in src/
OgResolvedGroupCollection.php - Adds a group to the collection.
- OgResolvedGroupCollection::hasGroup in src/
OgResolvedGroupCollection.php - Returns whether the given group has already been added.
- OgResolvedGroupCollection::removeGroup in src/
OgResolvedGroupCollection.php - Removes the given group from the collection.
File
- src/
OgResolvedGroupCollection.php, line 114
Class
- OgResolvedGroupCollection
- Contains a collection of groups discovered by OgGroupResolver plugins.
Namespace
Drupal\ogCode
protected function generateKey(ContentEntityInterface $group) {
return $group
->getEntityTypeId() . '|' . $group
->id();
}