You are here

function photobox_attached_resources in PhotoboxPhotobox 7

Utility function to get #attached resources.

1 call to photobox_attached_resources()
photobox_field_formatter_view in ./photobox.module
Implements hook_field_formatter_view().

File

./photobox.module, line 291
Main file for the Photobox module.

Code

function photobox_attached_resources() {
  $settings = array();
  foreach (_photobox_settings() as $key => $setting) {
    $settings[$key] = (bool) $setting;
  }
  return array(
    'library' => array(
      array(
        'photobox',
        'photobox',
      ),
    ),
    'js' => array(
      drupal_get_path('module', 'photobox') . '/photobox.js',
      array(
        'data' => array(
          'photobox' => $settings,
        ),
        'type' => 'setting',
      ),
    ),
  );
}