You are here

function farm_asset_farm_asset_view_enable in farmOS 7

Callback to enable/disable the page from the UI.

Parameters

object $cache: Cache object for the page manager view.

bool $status: Whether or no the page manager override should be enabled.

1 string reference to 'farm_asset_farm_asset_view_enable'
farm_asset_farm_asset_view_page_manager_tasks in modules/farm/farm_asset/includes/ctools/farm_asset_view.inc
Specialized implementation of hook_farm_asset_task_tasks().

File

modules/farm/farm_asset/includes/ctools/farm_asset_view.inc, line 182
Handle the 'farm_asset view' override task.

Code

function farm_asset_farm_asset_view_enable($cache, $status) {
  variable_set('farm_asset_farm_asset_view_disabled', $status);

  // Set a global flag so that the menu routine knows it needs
  // to set a message if enabling cannot be done.
  if (!$status) {
    $GLOBALS['farm_asset_enabling_farm_asset_view'] = TRUE;
  }
}