Ejemplo n.º 1
0
 /**
  * @param $columnName
  * @return $this
  */
 public function addLinkColumn($columnName)
 {
     if (is_scalar($columnName)) {
         $column = new Link($this, $columnName);
     }
     if (is_array($columnName)) {
         $column = new Link($this, $columnName);
     }
     $this->columns[] = $column;
     $this->addJavascript($column->getJavascript(), $column->getName());
     return $this;
 }
Ejemplo n.º 2
0
 public function testLink()
 {
     $column = new Link($this->table, ['name' => 'test', 'url' => "{test}", 'label' => 'balls']);
     $column->setData(['test' => 'balls.com']);
     $output = $column->getValue();
     $this->assertTag(['tag' => 'a', 'attributes' => ['href' => 'balls.com'], 'content' => 'balls'], $output);
 }