{{Entity}}.class.php 507 B

12345678910111213141516171819202122
  1. {"label":"Entité","syntax":"php"}
  2. <?php
  3. /**
  4. * Define a {{entity}}.
  5. * @author {{user.fullname}}
  6. * @category Plugin
  7. * @license copyright
  8. */
  9. class {{Entity}} extends Entity{
  10. public $id{{:fields}},${{value.key}}{{/:fields}};
  11. protected $TABLE_NAME = '{{plugin}}_{{table}}';
  12. public $fields =
  13. array(
  14. 'id' => 'key',{{:fields}}
  15. '{{value.key}}' => '{{value.sql-type}}'{{;}},{{/;}}{{/:fields}}
  16. );
  17. public $links = array({{:links}}
  18. '{{value.key}}' => '{{value.entity}}'{{;}},{{/;}}{{/:links}}
  19. );
  20. }
  21. ?>