You are here

public function EntityLegalDocument::getAcceptanceLabel in Entity Legal 7.2

Same name and namespace in other branches
  1. 7 entity_legal.entity.inc \EntityLegalDocument::getAcceptanceLabel()

Get the label to be shown on the acceptance checkbox.

Return value

string The label to be shown on the acceptance checkbox.

File

./entity_legal.entity.inc, line 187
Entity API main classes used by entity_legal module.

Class

EntityLegalDocument
Legal Document entity with revision support.

Code

public function getAcceptanceLabel() {
  $label = '';
  $published_version = $this
    ->getPublishedVersion();
  if ($published_version) {
    $label = $published_version->acceptance_label;
  }
  if (module_exists('token') && module_exists('entity_token')) {
    $label = token_replace($label, array(
      'entity_legal_document' => $this,
    ));
  }
  return filter_xss($label);
}