function af_get in Arrange Fields 7
This is a helper function which will let me attempt to access indexes in an array which might not exist WITHOUT setting off a PHP Notice message in Drupal. A little kludgy? Perhaps, but I feel that it makes the code much more readable. For example, instead of: $x = (isset($GLOBALS["xyz"])) ? $GLOBALS["xyz"] : ""; I can just type: $x = af_get($GLOBALS["xyz"]); See what I mean? Much more simple and readable.
4 calls to af_get()
- arrange_fields_add_draggable_wrappers in ./
arrange_fields.module - In this function, we are going to add div's around elements we wish to make draggable on the page. The jQuery can then grab onto those divs to make them draggable.
- arrange_fields_form_alter in ./
arrange_fields.module - Implementation of hook_form_alter().
- arrange_fields_page_alter in ./
arrange_fields.module - arrange_fields_pre_render in ./
arrange_fields.module - This function is called before the elements are displayed on screen. The main thing we wish to do here is move the contents of #af_prefix and #af_suffix into the real #prefix and #suffix fields.
File
- ./
arrange_fields.module, line 1789
Code
function af_get(&$val) {
if (isset($val)) {
return $val;
}
else {
return "";
}
}