You are here

public function Vote::getVotedEntityId in Voting API 8.3

Returns the ID of the entity that the vote was cast on.

Return value

int The entity ID.

Overrides VoteInterface::getVotedEntityId

1 call to Vote::getVotedEntityId()
Vote::postSave in src/Entity/Vote.php
Acts on a saved entity before the insert or update hook is invoked.

File

src/Entity/Vote.php, line 68

Class

Vote
Defines the Vote entity.

Namespace

Drupal\votingapi\Entity

Code

public function getVotedEntityId() {
  return $this
    ->get('entity_id')->target_id;
}