public function withTable(string $tableName) : TableWidgetDefiner
    {
        if (!isset($this->tables[$tableName])) {
            throw InvalidArgumentException::format(
                'Invalid table name supplied to %s: expecting one of (%s), \'%s\' given',
                __METHOD__, Debug::formatValues(array_keys($this->tables)), $tableName
            );
        }

        return new TableWidgetDefiner($this->name, $this->label, $this->authSystem, $this->requiredPermissions, $this->tables[$tableName], $this->callback);
    }
public function withTable(string $tableName) : TableWidgetDefiner
    {
        if (!isset($this->tables[$tableName])) {
            throw InvalidArgumentException::format(
                'Invalid table name supplied to %s: expecting one of (%s), \'%s\' given',
                __METHOD__, Debug::formatValues(array_keys($this->tables)), $tableName
            );
        }

        return new TableWidgetDefiner($this->name, $this->label, $this->authSystem, $this->requiredPermissions, $this->tables[$tableName], $this->callback);
    }
public function withTable ( string $ tableName ) : TableWidgetDefiner { if ( ! isset ( $ this -> tables [ $ tableName ] ) ) { throw InvalidArgumentException :: format ( 'Invalid table name supplied to %s: expecting one of (%s), \'%s\' given' , __METHOD__ , Debug :: formatValues ( array_keys ( $ this -> tables ) ) , $ tableName ) ; } return new TableWidgetDefiner ( $ this -> name , $ this -> label , $ this -> authSystem , $ this -> requiredPermissions , $ this -> tables [ $ tableName ] , $ this -> callback ) ; }
Defines the table of which to load the widget from.

@param string $tableName

@return TableWidgetDefiner
@throws InvalidArgumentException
Defines the table of which to load the widget from .