src/Extension/Core/Type/BatchType.php
public function buildCellView(CellView $view, ColumnInterface $column, array $options)
    {
        if (!is_scalar($view->value)) {
            throw new UnexpectedTypeException($view->value, 'scalar');
        }

        $id = str_replace(':', '-', sprintf('%s-%s__%s', $view->datagrid->name, $view->name, $view->value));

        // Strip leading underscores and digits. These are allowed in
        // form names, but not in HTML4 ID attributes.
        // http://www.w3.org/TR/html401/struct/global.html#adef-id
        $id = ltrim($id, '_0123456789');

        $view->vars['datagrid_name'] = $view->datagrid->name;
        $view->vars['selection_name'] = sprintf('%s[%s][]', $view->datagrid->name, $view->name);
        $view->vars['selection_id'] = $id;
    }
public function buildCellView(CellView $view, ColumnInterface $column, array $options)
    {
        if (!is_scalar($view->value)) {
            throw new UnexpectedTypeException($view->value, 'scalar');
        }

        $id = str_replace(':', '-', sprintf('%s-%s__%s', $view->datagrid->name, $view->name, $view->value));

        // Strip leading underscores and digits. These are allowed in
        // form names, but not in HTML4 ID attributes.
        // http://www.w3.org/TR/html401/struct/global.html#adef-id
        $id = ltrim($id, '_0123456789');

        $view->vars['datagrid_name'] = $view->datagrid->name;
        $view->vars['selection_name'] = sprintf('%s[%s][]', $view->datagrid->name, $view->name);
        $view->vars['selection_id'] = $id;
    }
{@inheritdoc}