You are here

function registration_get_registration_instances in Entity Registration 8.2

Same name and namespace in other branches
  1. 8 registration.module \registration_get_registration_instances()
  2. 7.2 registration.module \registration_get_registration_instances()
  3. 7 registration.module \registration_get_registration_instances()

Return all registration field instances.

Return value

array A list of field instances

6 calls to registration_get_registration_instances()
RegistrationStandardTestCase::testRegistrationFieldCreate in tests/registration.test
Tests if registration fields were created successfully, and associated with an entity.
RegistrationStandardTestCase::testRegistrationFieldCreate in src/RegistrationStandardTestCase.php
Tests if registration fields were created successfully, and associated with an entity.
registration_admin_paths in ./registration.module
Implements hook_admin_paths().
registration_entity_set_default_settings in ./registration.module
Sets the the registration entity settings to the deafults.
registration_menu in ./registration.module
@FIXME This implementation of hook_menu() cannot be automatically converted because it contains logic (i.e., branching statements, function calls, object instantiation, etc.) You will need to convert it manually. Sorry!

... See full list

File

./registration.module, line 1356

Code

function registration_get_registration_instances($params = array()) {
  $registration_fields = field_read_fields(array(
    'type' => 'registration',
  ));
  $registration_instances = array();
  if (!empty($registration_fields)) {
    $field_name = array(
      'field_name' => array_keys($registration_fields),
    );
    $params = array_merge($field_name, $params);
    $registration_instances = field_read_instances($params);
  }
  return $registration_instances;
}