Piwik\DataTable::getRowsMetadata PHP Method

getRowsMetadata() public method

Returns an array containing the requested metadata value of each row.
public getRowsMetadata ( string $name ) : array
$name string The metadata column to return.
return array
    public function getRowsMetadata($name)
    {
        $metadataValues = array();
        foreach ($this->getRows() as $row) {
            $metadataValues[] = $row->getMetadata($name);
        }
        return $metadataValues;
    }

Usage Example

 public function test_filter_shouldUrlEncodeValues()
 {
     $mapping = array(1 => 'Core tests', 3 => 'plugins tästs');
     $this->table->filter($this->filter, array('segmentName', $mapping));
     $metadata = $this->table->getRowsMetadata('segment');
     $expected = array('segmentName==Core+tests', false, 'segmentName==plugins+t%C3%A4sts', false, false, false);
     $this->assertSame($expected, $metadata);
 }
All Usage Examples Of Piwik\DataTable::getRowsMetadata