function flexiform_entityreference_autocomplete_access_callback in Flexiform 7
Access callback for flexiform entityreference autocomplete.
1 string reference to 'flexiform_entityreference_autocomplete_access_callback'
- flexiform_menu in ./
flexiform.module - Implements hook_menu()
File
- ./
flexiform.module, line 772 - Module for the Flexiform system.
Code
function flexiform_entityreference_autocomplete_access_callback($type, $flexiform, $element_namespace) {
try {
$element = FlexiformElement::getElement($flexiform, $element_namespace);
$element_field = $element
->getField();
if ($element_field['type'] != 'entityreference') {
return FALSE;
}
// @todo: Check Flexiform Access.
return TRUE;
} catch (Exception $e) {
return FALSE;
}
}