123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- <?php
- function hook_entity_info() {
- $info['custom_entity'] = array(
- 'translation' => array(
- 'entity_translation' => array(
- 'class' => 'EntityTranslationCustomEntityHandler',
- 'base path' => 'custom_entity/%custom_entity',
- 'access callback' => 'custom_entity_tab_access',
- 'access arguments' => array(1),
- 'edit form' => 'custom_entity_form_state_key',
- 'bundle callback' => 'custom_entity_translation_enabled_bundle',
- 'default settings' => array(
- 'default_language' => LANGUAGE_NONE,
- 'hide_language_selector' => FALSE,
- ),
- ),
- ),
- );
-
- $info['custom_entity_2'] = array(
- 'translation' => array(
- 'entity_translation' => array(
- 'class' => 'EntityTranslationCustomEntityHandler',
- 'path schemes' => array(
- 'default' => array(
- 'base path' => 'custom_entity_2/%custom_entity',
- 'path wildcard' => '%custom_entity',
- ),
- 'fancy' => array(
-
- 'edit path' => 'fancy/%entity/edit',
- 'path wildcard' => '%entity',
- ),
- ),
- )
- )
- );
- return $info;
- }
- function hook_entity_translation_insert($entity_type, $entity, $translation, $values = array()) {
- }
- function hook_entity_translation_update($entity_type, $entity, $translation, $values = array()) {
- }
- function hook_entity_translation_delete($entity_type, $entity, $langcode) {
- }
- function hook_entity_translation_delete_revision($entity_type, $entity, $langcode) {
- }
|