Projet

Général

Profil

Révision dd54aff9

Ajouté par Assos Assos il y a plus de 10 ans

Weekly update of contrib modules

Voir les différences:

htmltest/sites/all/modules/entity/includes/entity.ui.inc
724 724
  entity_ui_controller($form_state['entity_type'])->$method($form, $form_state);
725 725
}
726 726

  
727
/**
728
 * Gets the page title for the passed operation.
729
 */
730
function entity_ui_get_page_title($op, $entity_type, $entity = NULL) {
731
  $label = entity_label($entity_type, $entity);
732
  switch ($op) {
733
    case 'view':
734
      return $label;
735
    case 'edit':
736
      return t('Edit @label', array('@label' => $label));
737
    case 'clone':
738
      return t('Clone @label', array('@label' => $label));
739
    case 'revert':
740
      return t('Revert @label', array('@label' => $label));
741
    case 'delete':
742
      return t('Delete @label', array('@label' => $label));
743
    case 'export':
744
      return t('Export @label', array('@label' => $label));
745
  }
746
  if (isset($entity)) {
747
    list(, , $bundle) = entity_extract_ids($entity_type, $entity);
748
  }
749
  return entity_ui_get_action_title($op, $entity_type, $bundle);
750
}
751

  
752 727
/**
753 728
 * Gets the page/menu title for local action operations.
754 729
 *
......
820 795
  return $output;
821 796
}
822 797

  
823
/**
824
 * Page callback for viewing an entity.
825
 *
826
 * @param Entity $entity
827
 *   The entity to be rendered.
828
 *
829
 * @return array
830
 *   A renderable array of the entity in full view mode.
831
 */
832
function entity_ui_entity_page_view($entity) {
833
  return $entity->view('full', NULL, TRUE);
834
}

Formats disponibles : Unified diff