You are here

public function CivicrmEntityUIController::hook_forms in CiviCRM Entity 7.2

Same name and namespace in other branches
  1. 7 civicrm_entity_ui_controller.inc \CivicrmEntityUIController::hook_forms()

Always use the same civicrm_entity_form

Return value

mixed

Overrides EntityDefaultUIController::hook_forms

File

./civicrm_entity_ui_controller.inc, line 11

Class

CivicrmEntityUIController

Code

public function hook_forms() {
  $forms = parent::hook_forms();
  foreach ($this->entityInfo['bundles'] as $bundle => $bundle_info) {
    if (isset($bundle_info['admin'])) {
      $form_id = !isset($bundle) || $bundle == $this->entityType ? $this->entityType . '_form' : $this->entityType . '_edit_' . $bundle . '_form';
      $forms[$form_id] = array(
        'callback' => 'civicrm_entity_form',
      );
    }
  }
  return $forms;
}