Exemplo n.º 1
0
 /**
  * @group Panels
  */
 public final function ContentPanelFullMonty()
 {
     $panel = ContentPanel::create(Paragraph::create('Content panel and header with everything'));
     $panel->appendContent(Paragraph::create('appended content'));
     $panel->prependContent(Paragraph::create('prepended content'));
     $header = PanelHeader::create('Panel Header with everything');
     $header->setStatus($header::STATUS_CLOSED);
     $header->addIcon();
     $header->setBgColour($header::BG_SUCCESS);
     $header->setActions([new Link('#', 'Action 1'), new Link('#', 'Action 2'), new Link('#', 'Action 3'), new Link('#', 'Action 4'), new Link('#', 'Action 5')]);
     return $panel->setHeader($header);
 }
Exemplo n.º 2
0
 public function testCollection()
 {
     $tags = Paragraph::collection(['a', 'b', 'c']);
     $this->assertEquals('<p>a</p><p>b</p><p>c</p>', SafeHtml::escape($tags, ''));
 }
Exemplo n.º 3
0
 private function _renderItem($key, $value)
 {
     return Paragraph::create([BoldText::create($key . ': ')->addClass('whois-key'), Span::create($value)->addClass('whois-value')]);
 }