summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorrit Schippers2012-08-10 12:38:13 (GMT)
committer Jorrit Schippers2012-08-10 12:38:13 (GMT)
commit749c0075f58c3e793892dcbf237d1085a5a1a15a (patch)
tree2e072bf254a41c4240f5e0489b14f640e3ff41ca
parentb8b4591ed3de77932b0d2d4c17fa1a0e95b0a2b6 (diff)
Supply entity and entity type to Video.js template
-rw-r--r--videojs.module4
1 files changed, 3 insertions, 1 deletions
diff --git a/videojs.module b/videojs.module
index c8616bc..e493901 100644
--- a/videojs.module
+++ b/videojs.module
@@ -31,7 +31,7 @@ function videojs_menu() {
function videojs_theme() {
return array(
'videojs' => array(
- 'variables' => array('items' => NULL, 'player_id' => NULL, 'attributes' => NULL),
+ 'variables' => array('items' => NULL, 'player_id' => NULL, 'attributes' => NULL, 'entity' => NULL, 'entity_type' => NULL),
'template' => 'theme/videojs',
'file' => 'includes/videojs.theme.inc',
),
@@ -113,6 +113,8 @@ function videojs_field_formatter_view($entity_type, $entity, $field, $instance,
'#items' => $items,
'#player_id' => 'videojs-' . $id . '-' . str_replace('_', '-', $instance['field_name']),
'#attached' => videojs_add(FALSE),
+ '#entity' => $entity,
+ '#entity_type' => $entity_type,
),
);
}