public function withStructure(callable $structureDefinitionCallback) : TableViewsDefiner
    {
        $definition = new GroupedTableDefinition($this->data);

        $structureDefinitionCallback($definition);

        return new TableViewsDefiner($this->name, $this->callback, new GroupedTableDataSourceAdapter(
                $definition->finalize()
        ));
    }
public function withStructure(callable $structureDefinitionCallback) : TableViewsDefiner
    {
        $definition = new GroupedTableDefinition($this->data);

        $structureDefinitionCallback($definition);

        return new TableViewsDefiner($this->name, $this->callback, new GroupedTableDataSourceAdapter(
                $definition->finalize()
        ));
    }
public function withStructure ( callable $ structureDefinitionCallback ) : TableViewsDefiner { $ definition = new GroupedTableDefinition ( $ this -> data ) ; $ structureDefinitionCallback ( $ definition ) ; return new TableViewsDefiner ( $ this -> name , $ this -> callback , new GroupedTableDataSourceAdapter ( $ definition -> finalize ( ) ) ) ; }
Defines the structure of the table using the grouped table definition
mapping class.

Example:
<code>
->withStructure(function (GroupedTableDefinition $map) {
$map->groupedBy(...);

$map->computed(...)->to(...);
$map->sum(...)->to(...);
})
</code>

@see ObjectTableDefinition

@param callable $structureDefinitionCallback

@return TableViewsDefiner
Defines the structure of the table using the grouped table definition mapping class .