public function __construct($id, $foreground = null, $background = null, $customNode = "div") { parent::__construct($customNode); $this->setId($id); $foregroundColor = null; if ($foreground != null) { $foregroundColor = new color($foreground); } $backgroundColor = null; if ($background != null) { $backgroundColor = new backgroundcolor($background); } $this->addCssElements(new simpleproperty(new colors($foregroundColor, $backgroundColor))); }
public function __construct($id, $foreground, $background, $customNode = "section", iCssElement $customSpacing = null) { parent::__construct($customNode); $this->setId($id); if ($customSpacing === null) { $this->addCssElements(new responsiveproperty(new emptyproperty(), new padding(SMALL_SPACER, NO_SPACER), new padding(LARGE_SPACER, NO_SPACER), new padding(EXTRA_LARGE_SPACER, NO_SPACER), new padding(EXTRA_LARGE_SPACER, NO_SPACER))); } else { $this->addCssElements($customSpacing); } $foregroundColor = null; if ($foreground != null) { $foregroundColor = new color($foreground); } $backgroundColor = null; if ($background != null) { $backgroundColor = new backgroundcolor($background); } $this->addCssElements(new simpleproperty(new colors($foregroundColor, $backgroundColor))); }
public function getHtml() { $button = new button($this->submitText); $this->addContent($button); return parent::getHtml(); }