hook_def()
importexportapi/docs/developer/hooks/importexportapi.php, line 25
Declare the data definition of one or more entities and its child fields.
An array keyed by entity field name. Each element of the array is a nested data definition.
| Name | Description |
|---|---|
| Hooks | Allow modules to interact with the Drupal core. |
<?php
function hook_def() {
$defs = array();
$def = array(
'#type' => 'entity',
'#title' => t('URL alias'),
'#xml_plural' => 'url-aliases',
'#csv_plural' => 'url-aliases'
);
$def['pid'] = array(
'#type' => 'int',
'#title' => t('URL alias ID'),
'#key' => TRUE
);
$def['src'] = array(
'#title' => t('System path'),
'#xml_mapping' => 'system-path',
'#csv_mapping' => 'system-path'
);
$def['dst'] = array(
'#title' => t('Aliased path'),
'#xml_mapping' => 'aliased-path',
'#csv_mapping' => 'aliased-path',
'#unique' => TRUE
);
$defs['url_alias'] = $def;
return $defs;
}
?>