@param string $rowName

@return $this
@throws \Exception
773418
public function addRowName($rowName) {
    if (isset($this->rows[$rowName])) {
      throw new \Exception("Row '$rowName' already exists.");
    }
    $this->rowNames[] = $rowName;
    $this->rows[$rowName] = $this->iRow++;
    return $this;
  }
439244
public function load($filename)
    {
        if (!file_exists($filename)) {
            throw new \Exception('Ini file "' . $filename . '" doesn\'t exist.');
            return false;
        }
        $this->filename = $filename;
        return $this;
    }
1277628
public function seek($row = 1)
    {
        if (($row < $this->startRow) || ($row > $this->endRow)) {
            throw new PHPExcel_Exception("Row $row is out of range ({$this->startRow} - {$this->endRow})");
        }
        $this->position = $row;

        return $this;
    }
756458
public function index(string $indexName = null)
    {
        $this->indexName = $indexName ?? $this->tableName . '_' . $this->name . '_index';

        return $this;
    }
962788
public function setHostname(string $hostname)
    {
        $this->hostname = $hostname;

        $this->raw = array_merge($this->raw, ['Hostname' => $hostname]);

        return $this;
    }
105126
public function dropColumn($columnName) {
        $this->dropColumns[] = $columnName;
        if (array_key_exists($columnName, $this->references)) {
            $this->dropReference($columnName);
        }
        return $this;
    }
37207
function td($rowName, $colName, $content) {
    $this->tbody->td($rowName, $colName, $content);
    return $this;
  }
511277
public function row($content)
    {
        if ($content instanceof Closure) {
            $row = new Row();
            call_user_func($content, $row);
            $this->addRow($row);
        } else {
            $this->addRow(new Row($content));
        }

        return $this;
    }
470990
public function remove($rowId)
        {
            if(!$this->hasRowId($rowId)) {
                throw new Exception('This cart does not contain this row.');
            }

            $cart = $this->getContent();

            $cart->forget($rowId);

            return $this->updateCart($cart);
        }
836311
public function setRows($rows = [])
    {
        if (Arr::isAssoc($rows)) {
            foreach ($rows as $key => $item) {
                $this->rows[] = [$key, $item];
            }

            return $this;
        }

        $this->rows = $rows;

        return $this;
    }
872502
public function setLastName($lastName) {
        if (empty($lastName))
            throw new Exception('Lastname must be set and cannot be empty.');

        $this->lastName = trim($lastName);

        return $this;
    }
259309
public function getMetadataFor($tableName, array $parentName = array())
    {
        $avaibleData = array();
        foreach ($this->getAllMetadata() as $metadata) {
            $avaibleData[] = $metadata->getName();
            if ($metadata->getName() === $tableName) {
                return $metadata;
            }
        }

        throw new \Exception(sprintf('"%s" not found in "%s"', $tableName, implode(', ', $avaibleData)));
    }
954643
public function insertRow($row)
    {
        if ($row instanceof Row) {
            $this->rows []= $row;
        } elseif (is_array($row)) {
            $newRow = new Row;
            foreach ($row as $cell) {
                $newRow->setCell($cell);
            }
            $this->insertRow($newRow);
        } else {
            throw new \InvalidArgumentException(
                "Argument 1 must be an instance of DataTable\Row or an array of DataTable\Cell"
            );
        }

        return $this;
    }
1240742
public function setRowSpan($rowSpan)
    {
        Expect::int($rowSpan);

        $this->attributes->set('rowspan', $rowSpan);

        return $this;
    }
501964
public function handle(string $tableName)
    {
        $recordFinder = GeneralUtility::makeInstance(RecordFinder::class);
        $recordData = GeneralUtility::makeInstance(RecordData::class);

        // First insert an empty row and get the uid of this row since
        // some fields need this uid for relations later.
        $fieldValues = [
            'pid' => $recordFinder->findPidOfMainTableRecord($tableName),
        ];
        $connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable($tableName);
        $connection->insert($tableName, $fieldValues);
        $fieldValues['uid'] = $connection->lastInsertId($tableName);
        $fieldValues = $recordData->generate($tableName, $fieldValues);
        $connection->update(
            $tableName,
            $fieldValues,
            [ 'uid' => $fieldValues['uid'] ]
        );

        $this->generateTranslatedRecords($tableName, $fieldValues);
    }
194349
public function getRelation($modelName): ?RowInterface
    {
        $relations = $this->getRelations($modelName);
        return empty($relations) ? null : current($relations);
    }
841966
public function addRow($data, $rowId = null)
    {
        if (($rowId === null) && isset($data['id'])) {
            $rowId = $data['id'];
        }

        if ($rowId === null) {
            $rowId = count($this->rows);
        }

        $this->rows[$rowId] = $data;

        return $this;
    }