You are here

function deploy_plan_entity_label in Deploy - Content Staging 7.3

Load an entity and generates the label for it.

Parameters

string $type: The type of entity included in the plan.

object $entity: The entity that's included in the plan.

int $rev: The revision identifier for the entity in the plan.

Return value

string The label for the entity.

4 calls to deploy_plan_entity_label()
DeployManagerEntitiesEntity::label in includes/DeployManagerEntitiesEntity.inc
Returns the label of the entity.
deploy_manager_entities_label in ./deploy.module
Entity label callback.
deploy_ui_plan::view_page in modules/deploy_ui/plugins/export_ui/deploy_ui_plan.class.php
Renders the view deployment plan page.
deploy_views_handler_entity_link_field::render in includes/views/handler_entity_link_field.inc
Render the field.

File

./deploy.module, line 784
Deploy module functions.

Code

function deploy_plan_entity_label($type, $entity, $rev = NULL) {
  $label = entity_label($type, $entity);
  if (empty($rev)) {
    $full_label = t('@entity_label', [
      '@entity_label' => $label,
    ]);
  }
  else {
    $full_label = t('@entity_label [rev:@rev]', [
      '@entity_label' => $label,
      '@rev' => $rev,
    ]);
  }
  return $full_label;
}