function _parseAttributes($attr, $exclude = null, $insertBefore = ' ', $insertAfter = null)
 {
     if (isset($attr['class']) && is_array($attr['class'])) {
         $attr['class'] = implode(' ', $attr['class']);
     }
     return parent::_parseAttributes($attr, $exclude, $insertBefore, $insertAfter);
 }
Esempio n. 2
0
 /**
  * Generates attributes from options. Overwritten from Helper::_parseAttributes
  * to take new minimized HTML5 attributes used here into account.
  *
  * @param array $options
  * @return string
  */
 function _parseAttributes($options)
 {
     $attributes = array();
     $minimizedAttributes = array('autoplay', 'controls', 'autobuffer', 'loop');
     foreach ($options as $key => $value) {
         if (in_array($key, $minimizedAttributes)) {
             if ($value === 1 || $value === true || $value === 'true' || $value == $key) {
                 $attributes[] = sprintf('%s="%s"', $key, $key);
                 unset($options[$key]);
             }
         }
     }
     return parent::_parseAttributes($options) . ' ' . implode(' ', $attributes);
 }
Esempio n. 3
0
 function _parseAttributes($options, $exclude = null, $insertBefore = ' ', $insertAfter = null)
 {
     $options = $this->normalizeAttributesOpt($options);
     return parent::_parseAttributes($options, $exclude, $insertBefore, $insertAfter);
 }