for a more complete description of creating a managed entity.
This hook is called for declaring managed entities via API. [See this tutorial](/extensions/civix/#generate-entity) for a more complete description of creating a managed entity.
*`$entityTypes` is a two-dimensional associative array. Each element in the array has:
* A **key** which is the DAO name of the entity as a string (e.g. `'CRM_Report_DAO_Instance'`), although this has not always been enforced.
* A **value** which is an associative with the following elements:
The *$entityTypes* is an array, where each item has the properties:
* `'name'`: *string, required* - a unique short name (e.g. `"ReportInstance"`)
-**name**: *string, required* – a unique short name (e.g.
"ReportInstance")
-**class**: *string, required* – a PHP DAO class (e.g.
"CRM_Report_DAO_Instance")
-**table**: *string, required* – a SQL table name (e.g.
"civicrm_report_instance")
-**fields_callback**: *array, optional* – a list of callback
functions which can modify the DAO field metadata.
(*function($class, &$fields)*) Added circa 4.7.11+
-**items_callback**: *array, optional* – a list of callback
functions which can modify the DAO foreign-key metadata.
(*function($class, &$links)*) Added circa 4.7.11+
* `'class'`: *string, required* - a PHP DAO class (e.g.`"CRM_Report_DAO_Instance"`)
The main key for *$entityTypes* should be a DAO name (e.g.
*$entityTypes['CRM_Report_DAO_Instance']*), although this has not
always been enforced.
* `'table'`: *string, required* - a SQL table name (e.g. `"civicrm_report_instance"`)
## Returns
- null
## Example: Add new entities
* `'fields_callback'`: *array, optional* - a list of callback functions which can modify the DAO field metadata. `function($class, &$fields)` Added circa 4.7.11+
* `'items_callback'`: *array, optional* - a list of callback functions which can modify the DAO foreign-key metadata. `function($class, &$links)` Added circa 4.7.11+
This example is taken from CiviVolunteer [here](https://github.com/civicrm/org.civicrm.volunteer/blob/eafc2b0c3966a492a3080ac70abe06cbd960a00e/volunteer.php#L333).