You are here

public function GroupRelationBase::getGroupType in Group 2.0.x

Returns the group type the plugin was instantiated for.

Return value

\Drupal\group\Entity\GroupTypeInterface|null The group type, if set in the plugin configuration.

Overrides GroupRelationInterface::getGroupType

File

src/Plugin/Group/Relation/GroupRelationBase.php, line 122

Class

GroupRelationBase
Provides a base class for GroupContentEnabler plugins.

Namespace

Drupal\group\Plugin\Group\Relation

Code

public function getGroupType() {
  if ($id = $this
    ->getGroupTypeId()) {
    return GroupType::load($id);
  }
}