private function wrapContent($content, \Nethgui\Renderer\Xhtml $insetRenderer) { $panel = $this->getRenderer()->panel()->setAttribute('tag', FALSE)->setAttribute('receiver', $this->getAttribute('receiver')); $flags = $this->getAttribute('flags'); $wrapFlags = $insetRenderer->calculateIncludeFlags($flags); $contentWidget = $this->getRenderer()->literal($content, $flags); if ($wrapFlags & \Nethgui\Renderer\WidgetFactoryInterface::INSET_FORM) { $contentWidget = $insetRenderer->form($flags)->setAttribute('tag', FALSE)->insert($contentWidget); } $panel->insert($contentWidget); if ($wrapFlags & \Nethgui\Renderer\WidgetFactoryInterface::INSET_WRAP) { $panel->setAttribute('tag', 'div'); $cssClass = $this->getAttribute('class', 'Inset'); if ($wrapFlags & \Nethgui\Renderer\WidgetFactoryInterface::INSET_DIALOG) { $cssClass .= ' Dialog'; } $panel->setAttribute('class', $cssClass); } return $panel; }
public function testForm() { $this->assertInstanceOf('Nethgui\\Widget\\XhtmlWidget', $this->object->form()); }