You are here

function _bricks_field_is_treeable in Bricks​ 7.5

Helper function to check if entityreference field has enabled treeable behavior.

Parameters

object $field:

Return value

bool

4 calls to _bricks_field_is_treeable()
bricks_field_attach_form in ./bricks.edit.inc
Implements hook_field_attach_form().
bricks_field_widget_form_alter in ./bricks.module
Implements hook_field_widget_form_alter().
bricks_inline_field_widget_form_alter in bricks_inline/bricks_inline.module
Implements hook_field_widget_form_alter().
bricks_process_field in ./bricks.module
Processes variables for theme_field().

File

./bricks.module, line 224

Code

function _bricks_field_is_treeable($field) {
  return $field['type'] == 'entityreference' && ($field_behaviors = $field['settings']['handler_settings']['behaviors']) && array_key_exists('treeable_behavior', $field_behaviors) && $field_behaviors['treeable_behavior']['status'];
}