You are here

function _mee_field_instance_enabled in Scald: Media Management made easy 7

Tests if MEE is supported and enabled for this field instance.

4 calls to _mee_field_instance_enabled()
mee_field_widget_form_alter in modules/fields/mee/mee.module
Implements hook_field_widget_form_alter().
text_field_delete in modules/fields/mee/mee.module
Implements hook_field_delete() on behalf of Text module.
text_field_insert in modules/fields/mee/mee.module
Implements hook_field_insert() on behalf of Text module.
text_field_update in modules/fields/mee/mee.module
Implements hook_field_update() on behalf of Text module.

File

modules/fields/mee/mee.module, line 766
Defines a special textarea, with drag and drop media driven by Scald and dnd.module.

Code

function _mee_field_instance_enabled($instance, $key = NULL) {
  $enables = array(
    'mee' => FALSE,
    'dnd' => FALSE,
  );
  if (!empty($instance['settings']['mee_enabled'])) {
    $enables['mee'] = TRUE;
  }
  if (!empty($instance['settings']['dnd_enabled'])) {
    $enables['dnd'] = TRUE;
  }
  return $key ? $enables[$key] : $enables;
}