2014-11-21 20:51:25 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
2015-04-10 23:28:54 +02:00
|
|
|
* Hooks provided by farm_area.
|
|
|
|
*
|
2014-11-21 20:51:25 +01:00
|
|
|
* This file contains no working PHP code; it exists to provide additional
|
|
|
|
* documentation for doxygen as well as to document hooks in the standard
|
|
|
|
* Drupal manner.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @defgroup farm_area Farm area module integrations.
|
|
|
|
*
|
|
|
|
* Module integrations with the farm_area module.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @defgroup farm_area_hooks Farm area's hooks
|
|
|
|
* @{
|
|
|
|
* Hooks that can be implemented by other modules in order to extend farm_area.
|
|
|
|
*/
|
|
|
|
|
2015-06-20 17:57:04 +02:00
|
|
|
/**
|
|
|
|
* Defines farm area types.
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
* Returns an array of farm area type information.
|
|
|
|
*/
|
|
|
|
function hook_farm_area_type_info() {
|
|
|
|
return array(
|
|
|
|
'building' => array(
|
|
|
|
'label' => t('Building'),
|
|
|
|
'weight' => 10,
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2015-05-15 16:55:12 +02:00
|
|
|
/**
|
|
|
|
* Provide details about farm areas.
|
|
|
|
*
|
|
|
|
* @param int $id
|
|
|
|
* The area id.
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
* Returns a render array to add to the area's popup.
|
|
|
|
*/
|
|
|
|
function hook_farm_area_details($id) {
|
|
|
|
|
|
|
|
// Start a render array.
|
|
|
|
$output = array();
|
|
|
|
|
|
|
|
// Add "Hello world!" to area details.
|
|
|
|
$output[] = array(
|
|
|
|
'#type' => 'markup',
|
|
|
|
'#markup' => 'Hello world!',
|
|
|
|
);
|
|
|
|
|
|
|
|
// Return the render array.
|
|
|
|
return $output;
|
|
|
|
}
|
|
|
|
|
2014-11-21 20:51:25 +01:00
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
*/
|