public function withStructure(callable $structureDefinitionCallback) : TableViewsDefiner
    {
        /** @var string|TypedObject $objectType */
        $objectType = $this->data->getObjectType();
        $definition = new ObjectTableDefinition($objectType::definition());

        $structureDefinitionCallback($definition);

        return new TableViewsDefiner($this->name, $this->callback, new ObjectTableDataSource(
                $definition->finalize(),
                $this->data
        ));
    }
public function withStructure(callable $structureDefinitionCallback) : TableViewsDefiner
    {
        /** @var string|TypedObject $objectType */
        $objectType = $this->data->getObjectType();
        $definition = new ObjectTableDefinition($objectType::definition());

        $structureDefinitionCallback($definition);

        return new TableViewsDefiner($this->name, $this->callback, new ObjectTableDataSource(
                $definition->finalize(),
                $this->data
        ));
    }
public function withStructure ( callable $ structureDefinitionCallback ) : TableViewsDefiner { /** @var string|TypedObject $objectType */ $ objectType = $ this -> data -> getObjectType ( ) ; $ definition = new ObjectTableDefinition ( $ objectType :: definition ( ) ) ; $ structureDefinitionCallback ( $ definition ) ; return new TableViewsDefiner ( $ this -> name , $ this -> callback , new ObjectTableDataSource ( $ definition -> finalize ( ) , $ this -> data ) ) ; }
Defines the structure of the table using the table object definition
mapping class.

Example:
<code>
->withStructure(function (ObjectTableDefinition $map) {
$map->property('foo')->to(...);
})
</code>

@see ObjectTableDefinition

@param callable $structureDefinitionCallback

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