123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- class TripalBundleController extends EntityAPIControllerExportable {
- public function __construct($entityType) {
- parent::__construct($entityType);
-
-
-
-
-
-
-
-
-
- $bundle_of = $entityType;
- $bundle_of = preg_replace('/_bundle/', '', $bundle_of);
- $info = entity_get_info($bundle_of);
- $this->bundleKey = $info['bundle keys']['bundle'];
- $this->entityInfo['bundle of'] = $bundle_of;
- }
-
- public function create(array $values = array()) {
-
- $values += array(
- 'id' => '',
- 'is_new' => TRUE,
- 'data' => '',
- );
- return parent::create($values);
- }
- }
|