public function renderRow($row, array $data = [])
    {
        if (is_string($row)) {
            if (null === $element = $this->editor->getRepository()->findRowByName($row)) {
                $this->persist($element = $this->editor->getRowManager()->create($row, $data));
            }
            $row = $element;
        }

        if ($row instanceof EM\RowInterface) {
            $this->tagManager->addTags($row->getEntityTag());

            $row = $this->editor->getViewBuilder()->buildRow($row);
        }

        if (!$row instanceof View\RowView) {
            throw new Exception\InvalidArgumentException(
                'Expected string or instance of ' .
                EM\RowInterface::class . ' or ' .
                View\RowView::class
            );
        }

        /** @noinspection PhpInternalEntityUsedInspection */
        return $this->getTemplate()->renderBlock('cms_row', [
            'row' => $row,
        ]);
    }
public function renderRow($row, array $data = [])
    {
        if (is_string($row)) {
            if (null === $element = $this->editor->getRepository()->findRowByName($row)) {
                $this->persist($element = $this->editor->getRowManager()->create($row, $data));
            }
            $row = $element;
        }

        if ($row instanceof EM\RowInterface) {
            $this->tagManager->addTags($row->getEntityTag());

            $row = $this->editor->getViewBuilder()->buildRow($row);
        }

        if (!$row instanceof View\RowView) {
            throw new Exception\InvalidArgumentException(
                'Expected string or instance of ' .
                EM\RowInterface::class . ' or ' .
                View\RowView::class
            );
        }

        /** @noinspection PhpInternalEntityUsedInspection */
        return $this->getTemplate()->renderBlock('cms_row', [
            'row' => $row,
        ]);
    }
public function renderRow ( $ row , array $ data = [ ] ) { if ( is_string ( $ row ) ) { if ( null === $ element = $ this -> editor -> getRepository ( ) -> findRowByName ( $ row ) ) { $ this -> persist ( $ element = $ this -> editor -> getRowManager ( ) -> create ( $ row , $ data ) ) ; } $ row = $ element ; } if ( $ row instanceof EM \ RowInterface ) { $ this -> tagManager -> addTags ( $ row -> getEntityTag ( ) ) ; $ row = $ this -> editor -> getViewBuilder ( ) -> buildRow ( $ row ) ; } if ( ! $ row instanceof View \ RowView ) { throw new Exception \ InvalidArgumentException ( 'Expected string or instance of ' . EM \ RowInterface :: class . ' or ' . View \ RowView :: class ) ; } /** @noinspection PhpInternalEntityUsedInspection */ return $ this -> getTemplate ( ) -> renderBlock ( 'cms_row' , [ 'row' => $ row , ] ) ; }
Renders the row.

@param EM\RowInterface|View\RowView $row
@param array                        $data

@return string
@throws Exception\InvalidArgumentException
Renders the row .