TripalBundleController.inc 780 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * The Controller for Tripal data type entities
  4. */
  5. class TripalBundleController extends EntityAPIControllerExportable {
  6. public function __construct($entityType) {
  7. parent::__construct($entityType);
  8. }
  9. /**
  10. * Create a type - we first set up the values that are specific
  11. * to our type schema but then also go through the EntityAPIController
  12. * function.
  13. *
  14. * @param $type
  15. * The machine-readable type of the tripal data entity.
  16. *
  17. * @return
  18. * A type object with all default fields initialized.
  19. */
  20. public function create(array $values = array()) {
  21. // Add values that are specific to our entity
  22. $values += array(
  23. 'id' => '',
  24. 'is_new' => TRUE,
  25. 'data' => '',
  26. );
  27. return parent::create($values);
  28. }
  29. }