cssClass = $class; } // ################################################################### /** * Sets the style information */ public function setStyle(Array $attributes) { $this->style = $attributes; } // ################################################################### /** * Returns a string of CSS style attributes * * @return string CSS attributes */ protected function _prepareStyle() { if (empty($this->style) AND empty($this->cssClass)) { return; } if ($this->cssClass == ':swap:') { BSFunctions::SwapCssClasses(); $class = BSFunctions::$cssClass; } else { $class = $this->cssClass; } $attrs = array(); foreach ($this->style AS $prop => $value) { $attrs[] = $prop . ': ' . $value; } $style = implode('; ', $attrs); $string = ''; if ($class) { $string .= ' class="' . $class . '"'; } if ($style) { $string .= ' style="' . $style . '"'; } return $string; } } /*=====================================================================* || ################################################################### || # $HeadURL$ || # $Id$ || ################################################################### \*=====================================================================*/ ?>