You are here

public function Entity::voteIsAvailable in Like & Dislike 7

File

src/Model/Entity.php, line 54

Class

Entity
@file

Namespace

Drupal\like_and_dislike\Model

Code

public function voteIsAvailable() {

  /*
   * I don't see any reason to allow Votes on other than these entity types.
   * If you think of an Entity Type that should be considered here, please
   * open an issue.
   */
  if (isset($this->bundle) && in_array($this->entity_type, self::$available_entity_types)) {
    return variable_get('like_and_dislike_vote_' . $this->bundle . '_available', FALSE);
  }
  return FALSE;
}