Answers.Body: <p>So a little research takes me to <a href="https://civicrm.org/blog/totten/api-and-art-installation">Totten's blog</a> where he lays out the rational for splitting out entity definitions into seperate PHP files.</p>
  
  <p>The full definition of the array format is laid out in the <a href="https://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_managed"><code>hook_civicrm_managed</code> guide</a> and an example <a href="https://github.com/eileenmcnaughton/nz.co.fuzion.extendedreport/blob/master/CRM/Extendedreport/Form/Report/Price/Lineitem.mgd.php"><code>.mgd.php</code> file is here</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-27T07:45:33.233Z
Answers.LastActivityDate: 2017-01-27T07:45:33.233Z
Answers.UserDisplayName: ErichBSchulz
Body: <p>Browsing through a <code>civix</code> generated file I see it globbing for <code>*.mgd.php</code> files? </p>
  
  <p>What are these files all about then??</p>
  
Tags: <extension><php><civicrm-entity><civix><entity-reference>
Title: What are `*.mgd.php` files for?
ThreadText: # What are `*.mgd.php` files for?
  
  (Asked by: username_0 on 2017-01-27)
  
  Browsing through a `civix` generated file I see it globbing for `*.mgd.php` files?
  
  What are these files all about then??
  
  **Tags:** extension, php, civicrm-entity, civix, entity-reference
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-01-27. Score: 5 | Accepted answer
  
  So a little research takes me to [Totten's blog](https://civicrm.org/blog/totten/api-and-art-installation) where he lays out the rational for splitting out entity definitions into seperate PHP files.
  
  The full definition of the array format is laid out in the [`hook_civicrm_managed` guide](https://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_managed) and an example [`.mgd.php` file is here](https://github.com/eileenmcnaughton/nz.co.fuzion.extendedreport/blob/master/CRM/Extendedreport/Form/Report/Price/Lineitem.mgd.php)
  
  
  ---
  
  