| @@ 1133-1148 (lines=16) @@ | ||
| 1130 | * |
|
| 1131 | * @return mixed |
|
| 1132 | */ |
|
| 1133 | protected function getElementClassString() |
|
| 1134 | { |
|
| 1135 | $elementClass = $this->getElementClass(); |
|
| 1136 | ||
| 1137 | if (Arr::isAssoc($elementClass)) { |
|
| 1138 | $classes = []; |
|
| 1139 | ||
| 1140 | foreach ($elementClass as $index => $class) { |
|
| 1141 | $classes[$index] = is_array($class) ? implode(' ', $class) : $class; |
|
| 1142 | } |
|
| 1143 | ||
| 1144 | return $classes; |
|
| 1145 | } |
|
| 1146 | ||
| 1147 | return implode(' ', $elementClass); |
|
| 1148 | } |
|
| 1149 | ||
| 1150 | /** |
|
| 1151 | * Get element class selector. |
|
| @@ 1155-1170 (lines=16) @@ | ||
| 1152 | * |
|
| 1153 | * @return string|array |
|
| 1154 | */ |
|
| 1155 | protected function getElementClassSelector() |
|
| 1156 | { |
|
| 1157 | $elementClass = $this->getElementClass(); |
|
| 1158 | ||
| 1159 | if (Arr::isAssoc($elementClass)) { |
|
| 1160 | $classes = []; |
|
| 1161 | ||
| 1162 | foreach ($elementClass as $index => $class) { |
|
| 1163 | $classes[$index] = '.'.(is_array($class) ? implode('.', $class) : $class); |
|
| 1164 | } |
|
| 1165 | ||
| 1166 | return $classes; |
|
| 1167 | } |
|
| 1168 | ||
| 1169 | return '.'.implode('.', $elementClass); |
|
| 1170 | } |
|
| 1171 | ||
| 1172 | /** |
|
| 1173 | * Add the element class. |
|