You are here

function _slick_fields_get_bundle_path in Slick Carousel 7.2

Helper function for getting correct bundle for manage field/display path.

1 call to _slick_fields_get_bundle_path()
_slick_fields_field_formatter_settings_form in slick_fields/includes/slick_fields.formatters.admin.inc
Off-loaded hook_field_formatter_settings_form().

File

slick_fields/includes/slick_fields.formatters.admin.inc, line 410
Off-loaded hooks for the Slick fields admin.

Code

function _slick_fields_get_bundle_path($instance) {
  $path = array();
  switch ($instance['entity_type']) {
    case 'bean':
      $path['field'] = 'admin/structure/block-types/manage/' . $instance['bundle'] . '/fields/' . $instance['field_name'];
      $path['display'] = 'admin/structure/block-types/manage/' . $instance['bundle'] . '/display';
      break;
    case 'taxonomy_term':
      $path['field'] = 'admin/structure/taxonomy/' . $instance['bundle'] . '/fields/' . $instance['field_name'];
      $path['display'] = 'admin/structure/taxonomy/' . $instance['bundle'] . '/display';
      break;
    default:
      $path['field'] = 'admin/structure/types/manage/' . $instance['bundle'] . '/fields/' . $instance['field_name'];
      $path['display'] = 'admin/structure/types/manage/' . $instance['bundle'] . '/display';
      break;
  }
  return $path;
}