/ */ class P4Cms_View_Helper_HeadStyle extends Zend_View_Helper_HeadStyle { /** * Convert content and attributes into valid style tag * * We add the item's media value to _mediaTypes and then call the parent method. * This way, the media type validation in the parent is ignored. * * @param stdClass $item Item to render * @param string $indent Indentation to use * @return string */ public function itemToString(stdClass $item, $indent) { $value = isset($item->attributes['media']) ? $item->attributes['media'] : ''; if (false === strpos($value, ',')) { $this->_mediaTypes[] = $value; } else { foreach (explode(',', $value) as $type) { $this->_mediaTypes[] = trim($type); } } return parent::itemToString($item, $indent); } }