function disable_field_check_disable in Disable Field 7
Generate a count of status using all values.
2 calls to disable_field_check_disable()
- disable_field_form_alter in ./
disable_field.module - Implements hook_form_alter().
- disable_field_form_node_form_alter in ./
disable_field.module - Implements hook_form_node_form_alter().
File
- ./
disable_field.module, line 249 - Defines a checkbox field to disable by admin in Field Edit page.
Code
function disable_field_check_disable($node_type, $key, $page, $entity) {
$disable_query = db_select('disable_field', 'dt');
$disable_query
->fields('dt', array(
'roles',
));
$disable_query
->condition('dt.bundle', $node_type, '=');
$disable_query
->condition('dt.entity_type', $entity, '=');
$disable_query
->condition('dt.field_name', $key, '=');
$disable_query
->condition('dt.page', $page, '=');
$disable_result = $disable_query
->execute()
->fetchAll();
return $disable_result;
}