Ejemplo n.º 1
0
 /**
  * Render view
  *
  * @see Hokuken\HaikMarkdown\Plugin\Bootstrap\Cols\ColsPlugin::renderView
  */
 public function renderView($data = array())
 {
     foreach ($this->row as $column) {
         $thumbnail = isset($column->thumbnail) ? $column->thumbnail : '';
         $content = $column->getContent();
         $content = '<div class="thumbnail">' . $thumbnail . '<div class="caption">' . $content . '</div></div>';
         $column->setContent($content);
     }
     return parent::renderView($data);
 }
Ejemplo n.º 2
0
 /**
  * Render view
  *
  * @see Hokuken\HaikMarkdown\Plugin\Bootstrap\Cols\ColsPlugin::renderView
  */
 public function renderView($data = array())
 {
     foreach ($this->row as $column) {
         $thumbnail = isset($column->thumbnail) ? $column->thumbnail : '';
         $hot = $column->hot === false ? '' : $column->hot;
         $content = $column->getContent();
         $content = '<div class="tile' . $hot . '">' . $thumbnail . $content . '</div>';
         $column->setContent($content);
     }
     return parent::renderView($data);
 }
Ejemplo n.º 3
0
 /**
  * @dataProvider specialAttributeProvider
  */
 public function testSpecialAttribute($attrs, $expected)
 {
     $plugin = new ColsPlugin($this->parser);
     $body = "\n\n";
     isset($attrs['id']) && $plugin->setSpecialIdAttribute($attrs['id']);
     isset($attrs['class']) && $plugin->setSpecialClassAttribute($attrs['class']);
     $result = $plugin->convert([], $body);
     $this->assertTag($expected, $result);
 }