Skip to content

Instantly share code, notes, and snippets.

@ornicar
Created February 21, 2010 20:45
Show Gist options
  • Save ornicar/310528 to your computer and use it in GitHub Desktop.
Save ornicar/310528 to your computer and use it in GitHub Desktop.
dmMediaTagBaseFlowPlayer l.50
protected function prepareAttributesForHtml(array $attributes)
{
$attributes = parent::prepareAttributesForHtml($attributes);
$attributes = $this->prepareSplash($attributes);
$attributes = $this->jsonifyAttributes($attributes);
// Here add a hook to allow another plugin to pass additional options
$event = new sfEvent($this, 'dm_flow_player.media_tag.filter_attributes');
$attributes = $this->context->getEventDispatcher()->filter($event, $attributes)->getReturnValue();
$attributes['style'] = sprintf('width: %s; height: %s; display: block;',
$this->cleanDimension(dmArray::get($attributes, 'width', 'auto')),
$this->cleanDimension(dmArray::get($attributes, 'height', 'auto'))
);
unset($attributes['width'], $attributes['height']);
return $attributes;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment