You are here

function party_simplenews_handler_field_primary_email::render in Party 8.2

File

modules/party_simplenews/includes/views/party_simplenews_handler_field_primary_email.inc, line 21
Contains a Views field handler to take care of displaying deletes links as fields

Class

party_simplenews_handler_field_primary_email
@file Contains a Views field handler to take care of displaying deletes links as fields

Code

function render($values) {
  $type = $values->{$this->aliases['type']};
  $party_id = $values->{$this->aliases['pid']};

  //Creating a dummy party to check access against
  $dummy_party = (object) array(
    'pid' => $party_id,
    'type' => $type,
  );
  return reset(party_get_all_emails($dummy_party));
}