private function createRow($template)
    {
        // semantic html5 element is marked as beginning of new grid row
        if ($template->bootstrap_isGridElement == 'row') {
            try {
                static::$grids[$template->id] = Factory::createById($template->bootstrap_grid);
                static::$count[$template->id] = 0;
            } catch (\InvalidArgumentException $e) {
                echo $e->getMessage();

                return;
            }

            $class = ($template->class ? ' ' : '') . 'row';

            if (static::$grids[$template->id]->getRowClass()) {
                $class .= ' ' . static::$grids[$template->id]->getRowClass();
            }

            $template->class .= $class;
        }
    }