You are here

function entity_translation_translation_exists_ctools_access_settings in Entity Translation 7

Settings form for the 'by node_language' access plugin

1 string reference to 'entity_translation_translation_exists_ctools_access_settings'
translation_exists.inc in plugins/access/translation_exists.inc
Plugin to provide access control on entities based on translations.

File

plugins/access/translation_exists.inc, line 68
Plugin to provide access control on entities based on translations.

Code

function entity_translation_translation_exists_ctools_access_settings($form, &$form_state, $conf) {
  $options = array(
    ENTITY_TRANSLATION_LANGUAGE_CURRENT => t('Current content language'),
    ENTITY_TRANSLATION_LANGUAGE_DEFAULT => t('Default site language'),
    LANGUAGE_NONE => t('Language neutral'),
  );
  $options = array_merge($options, locale_language_list());
  $form['settings']['language'] = array(
    '#title' => t('Language'),
    '#type' => 'checkboxes',
    '#options' => $options,
    '#description' => t('This rule will pass if any of these languages are present.'),
    '#default_value' => $conf['language'],
  );
  return $form;
}