function ctools_entity_bundle_ctools_access_settings

Settings form for the 'by entity_bundle' access plugin.

1 string reference to 'ctools_entity_bundle_ctools_access_settings'
entity_bundle.inc in plugins/access/entity_bundle.inc
Plugin to provide access control based upon entity bundle.

File

plugins/access/entity_bundle.inc, line 48

Code

function ctools_entity_bundle_ctools_access_settings($form, &$form_state, $conf) {
    $plugin = $form_state['plugin'];
    $entity_type = explode(':', $plugin['name']);
    $entity_type = $entity_type[1];
    $entity = entity_get_info($entity_type);
    foreach ($entity['bundles'] as $type => $info) {
        $options[$type] = check_plain($info['label']);
    }
    $form['settings']['type'] = array(
        '#title' => t('Entity Bundle'),
        '#type' => 'checkboxes',
        '#options' => $options,
        '#description' => t('Only the checked entity bundles will be valid.'),
        '#default_value' => $conf['type'],
    );
    return $form;
}