Add a basic "harbormaster.step.edit" API method
[phabricator/blender.git] / src / view / fuel / FuelComponentView.php
blobdda96a7bd5e7cad2f5f8772332b846d81d3b7623
1 <?php
3 abstract class FuelComponentView
4 extends FuelView {
6 private $classes = array();
8 final public function addClass($class) {
9 $this->classes[] = $class;
10 return $this;
13 private function getClasses() {
14 return $this->classes;
17 final protected function newComponentTag(
18 $tag,
19 array $attributes,
20 $content) {
22 $classes = $this->getClasses();
23 if (isset($attributes['class'])) {
24 $classes[] = $attributes['class'];
27 if ($classes) {
28 $classes = implode(' ', $classes);
29 $attributes['class'] = $classes;
32 return javelin_tag($tag, $attributes, $content);