amitaibu / og

A fork to work on OG8
https://github.com/Gizra/og
29 stars 16 forks source link

Consolidate method names when dealing with groups and entity types #200

Open amitaibu opened 8 years ago

amitaibu commented 8 years ago

    /** @var OgMembership $membership */
    $membership = OgMembership::create(['type' => OgMembershipInterface::TYPE_DEFAULT]);
    $membership
      ->setUser($this->user->id())
      ->setEntityId($this->nodeGroup->id())
      ->setGroupEntityType($this->nodeGroup->getEntityTypeId())
      ->save();

    $this->ogRole = OgRole::create();
    $this->ogRole
      ->setId('content_editor')
      ->setLabel('Content editor')
      ->setGroupType('node')
      ->setGroupBundle($this->groupBundle)
      ->save();

OgMembership: setEntityId -> setGroupId

ogRole : setGroupType -> setGroupEntityType