You are here

function hook_entity_legal_published_version_alter in Entity Legal 7

Same name and namespace in other branches
  1. 7.2 entity_legal.api.php \hook_entity_legal_published_version_alter()

Alter the published version name of a document before it's loaded.

@note This value will not be exported and is useful for bypassing features exported values.

Parameters

string $published_version_name: The entity name of the Legal Document Version.

EntityLegalDocument $legal_document: The Legal Document the version is being loaded for.

File

./entity_legal.api.php, line 29
API documentation for entity_legal module.

Code

function hook_entity_legal_published_version_alter(&$published_version_name, EntityLegalDocument $legal_document) {
  if ($legal_document
    ->identifier() == 'foo') {
    $published_version_name = 'bar';
  }
}