Piwik\DataTable\Row::deleteColumn PHP Method

deleteColumn() public method

Deletes the given column.
public deleteColumn ( string $name ) : boolean
$name string The column name.
return boolean `true` on success, `false` if the column does not exist.
    public function deleteColumn($name)
    {
        if (!$this->offsetExists($name)) {
            return false;
        }
        unset($this[$name]);
        return true;
    }

Usage Example

Exemplo n.º 1
0
 public function test_deleteColumn_shouldReturnAColumnValueThatIsNull()
 {
     $this->row->setColumn('label', null);
     $this->assertTrue($this->row->hasColumn('label'));
     $this->assertTrue($this->row->deleteColumn('label'));
     $this->assertFalse($this->row->hasColumn('label'));
 }
All Usage Examples Of Piwik\DataTable\Row::deleteColumn