/**
  * Create the row class.
  *
  * @param \Template $template The template.
  *
  * @return void
  */
 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;
     }
 }
 /**
  * Update the subcolumns definition.
  *
  * @param int    $gridId The grid id.
  * @param string $type   The subcolumns type.
  *
  * @return void
  * @SuppressWarnings(PHPMD.Superglobals)
  */
 private function updateSubcolumnsDefinition($gridId, $type)
 {
     $grid = Factory::createById($gridId);
     $GLOBALS['TL_SUBCL'][static::$name]['sets'][$type] = $this->prepareContainer($grid);
     if ($grid->getRowClass()) {
         $GLOBALS['TL_SUBCL'][static::$name]['scclass'] = 'row ' . $grid->getRowClass();
     } else {
         $GLOBALS['TL_SUBCL'][static::$name]['scclass'] = 'row';
     }
 }
 /**
  * Get a walker for the subscribed event.
  *
  * @param ReplaceInsertTagsEvent $event The subscribed event.
  *
  * @return Walker|null
  */
 private function getWalker(ReplaceInsertTagsEvent $event)
 {
     $identifier = $event->getParam(0);
     if (!isset(static::$walkers[$identifier])) {
         list($columnSetId, $infinite) = $this->translateParams($event);
         try {
             static::$walkers[$identifier] = new Walker(Factory::createById($columnSetId), false, $infinite);
         } catch (\Exception $e) {
             return null;
         }
     }
     return static::$walkers[$identifier];
 }