1: <?php
2: /* This file contains the QTagStyler class.
3: *
4: * @package Controls
5: */
6:
7: /**
8: * A class that encapsulates the styles for a tag. It can be used to swap out a collection of styles for another
9: * collection of styles. Note that this is pretty much just an implementation of the QHtmlAttributeManager,
10: * which manages both html attributes and css styles. Modern HTML, CSS frameworks and javascript frameworks use
11: * more that just the "style" attribute to style an html object.
12: *
13: * @package Controls
14: */
15: class QTagStyler extends QHtmlAttributeManager {
16:
17: /**
18: * Allows the row style to be overriden with an already existing QDataGridLegacyRowStyle
19: *
20: * @param QTagStyler $objOverrideStyle
21: *
22: * @return QTagStyler
23: */
24: public function ApplyOverride(QTagStyler $objOverrideStyle) {
25: $objNewStyle = clone $this;
26:
27: $objNewStyle->Override($objOverrideStyle);
28:
29: return $objNewStyle;
30: }
31:
32: /**
33: * Returns HTML attributes for the QDataGridLegacy row.
34: * Deprecated. Please use renderHtmlAttributes().
35: *
36: * @return string HTML attributes
37: * @deprecated
38: */
39: public function GetAttributes() {
40: return $this->RenderHtmlAttributes();
41: }
42:
43: /**
44: * Sets the attributes to the given array.
45: *
46: * @param $attributes
47: */
48: public function SetAttributes($attributes) {
49: $this->attributes = $attributes;
50: }
51: }
52: