You are here

function farm_plan_view in farmOS 7

Plan view callback.

Parameters

FarmPlan $farm_plan: The farm plan entity.

Return value

array Returns the entity render array.

1 string reference to 'farm_plan_view'
farm_plan_menu in modules/farm/farm_plan/farm_plan.module
Implements hook_menu().

File

modules/farm/farm_plan/farm_plan.pages.inc, line 17
Farm plan pages.

Code

function farm_plan_view(FarmPlan $farm_plan) {

  // Set the page title.
  drupal_set_title(entity_label('farm_plan', $farm_plan));

  // Build the plan's render array.
  $build = entity_view('farm_plan', array(
    entity_id('farm_plan', $farm_plan) => $farm_plan,
  ), 'full');

  // Return the render array.
  return $build;
}