예제 #1
0
 public function testBooleanColumn()
 {
     $column = new Boolean($this->table, 'test');
     $column->setData(['test' => 0]);
     $output = $column->getValue();
     $this->assertTag(['tag' => 'span', 'attributes' => ['class' => 'label label-danger'], 'content' => 'No'], $output);
 }
예제 #2
0
 /**
  * @param $columnName
  * @return $this
  */
 public function addBooleanColumn($columnName)
 {
     if (is_scalar($columnName)) {
         $column = new Boolean($this, $columnName);
     }
     if (is_array($columnName)) {
         $column = new Boolean($this, $columnName);
     }
     $this->columns[] = $column;
     $this->addJavascript($column->getJavascript(), $column->getName());
     return $this;
 }