Render a human-readable description for the passed $dimensions

@param array $dimensions
@return string
547650
public function renderDimensions(array $dimensions)
    {
        $rendered = [];
        foreach ($dimensions as $dimensionIdentifier => $dimensionValue) {
            $dimensionConfiguration = $this->contentDimensionsConfiguration[$dimensionIdentifier];
            $preset = $this->findPresetInDimension($dimensionConfiguration, $dimensionValue);
            $rendered[] = $dimensionConfiguration['label'] . ' ' . $preset['label'];
        }

        return implode(', ', $rendered);
    }
1101509
public static function createIdentityMatrix($dimensions)
    {
        $grid = static::createFilledMatrix(null, $dimensions)->toArray();

        for ($x = 0; $x < $dimensions; ++$x) {
            $grid[$x][$x] = 1;
        }

        return new Matrix($grid);
    }
51941
protected function createContentContext($workspaceName, array $dimensions = [])
    {
        $contextProperties = [
            'workspaceName' => $workspaceName,
            'invisibleContentShown' => true,
            'inaccessibleContentShown' => true
        ];

        if ($dimensions !== []) {
            $contextProperties['dimensions'] = $dimensions;
            $contextProperties['targetDimensions'] = array_map(function ($dimensionValues) {
                return array_shift($dimensionValues);
            }, $dimensions);
        }

        return $this->_contextFactory->create($contextProperties);
    }
1202259
protected function serialize($vars)
    {
        $data = '';
        if (is_array($vars)) {
            foreach ($vars as $var=>$value)
                $data .= $var.'|'.serialize($value);
        }
        else {
            $data = 'b:0;';
        }

        return $data;
    }
349475
public function render(array $parameters = []): string
    {
        /** @var Location $location */
        $location = $parameters['location'];
        /** @var Content $content */
        $content = $parameters['content'];
        /** @var Language $language */
        $language = $parameters['language'];
        $versionNo = $content->getVersionInfo()->versionNo;

        // nonpublished content should use parent location instead because location doesn't exist yet
        if (!$content->contentInfo->published && null === $content->contentInfo->mainLocationId) {
            $parentLocations = $this->locationService->loadParentLocationsForDraftContent($content->getVersionInfo());
            $location = reset($parentLocations);
            $versionNo = null;
        }

        $siteaccesses = $this->siteaccessResolver->getSiteaccessesForLocation(
            $location,
            $versionNo,
            $language->languageCode
        );

        if (empty($siteaccesses)) {
            return $this->twig->render(
                '@ezdesign/content/content_edit/component/preview_unavailable.html.twig'
            );
        }

        return '';
    }
580138
protected function renderAttributes($attributes)
    {
        if (count((array) $attributes) == 0) {
            return '';
        }

        $return = [];

        foreach ($attributes as $key => $value) {
            $return[] = $key . '="' . $value . '"';
        }

        return ' ' . implode(' ', $return);
    }
784188
public function render(array $options = []): string
    {
        // Set the options to use
        $this->resolveOptions($options);

        if (false === $this->validate()) {
            return false;
        }

        // Splits the content of the cells to fit into the defined line length
        $this->splitCellsContent();

        /*
         * Calculate the height of each row and the width of each column.
         * The height is equal to highest cell content found in the row.
         * The width is equal to the longest line found in the content of each cell of the column.
         */
        $this->calculateSizes();

        $this->tableWidth = $this->calculateTableWidth();

        $table = $this->options['has_header'] ? $this->drawHeaderDivider() : $this->drawDivider();

        // If the top divider of the header hasn't to be shown...
        if ($this->options['has_header'] && false === $this->options['show_head_top_sep']) {
            // ... Remove it
            $table = '';
        }

        foreach ($this->data as $rowPosition => $rowContent) {
            $table .= $this->drawRow($rowPosition, $rowContent);
            $table .= $this->options['has_header'] && 0 === $rowPosition ? $this->drawHeaderDivider() : $this->drawDivider();
        }

        $this->table = $table;

        // Reset options
        $this->options = [];

        return $this->table;
    }
648802
protected function renderAttributes(array $attributes)
    {
        $attributeString = '';
        foreach ($attributes as $key => $value) {
            if (is_array($value)) {
                $value = implode(' ', $value);
            }
            // Skip attributes that are not to be set (required, disabled, ...).
            if ($value !== false && $value !== '') {
                $attributeString .= ' ' . htmlspecialchars($key, ENT_QUOTES, 'UTF-8');
                // HTML5: do not add a value to boolean attributes.
                // HTML4: add the name of the key as value for the attribute.
                if (!$this->html5 && $value === true) {
                    $value = $key;
                }
                if ($value !== true) {
                    $attributeString .= '="' . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '"';
                }
            }
        }
        return $attributeString;
    }
441610
public function output($rows)
    {
        if (!is_array($rows) || count($rows) === 0) {
            return;
        }

        $config = $this->getConfig();
        $widths = $this->_calculateWidths($rows);

        $this->_rowSeparator($widths);
        if ($config['headers'] === true) {
            $this->_render(array_shift($rows), $widths, ['style' => $config['headerStyle']]);
            $this->_rowSeparator($widths);
        }

        if (!$rows) {
            return;
        }

        foreach ($rows as $line) {
            $this->_render($line, $widths);
            if ($config['rowSeparator'] === true) {
                $this->_rowSeparator($widths);
            }
        }
        if ($config['rowSeparator'] !== true) {
            $this->_rowSeparator($widths);
        }
    }
18438
public function toString()
    {
        $output = [];
        $output[] = '<table' . $this->renderAttributes($this->getTableAttributes()) . '>';

        if (count($this->specialRows['header'])) {
            $output[] = $this->renderArea($this->specialRows['header'], 'thead', 'th');
        }

        $ids = array_diff(
            array_keys($this->rows),
            array_merge($this->specialRows['header'], $this->specialRows['footer'])
        );

        if (count($ids)) {
            $output[] = $this->renderArea($ids);
        }

        if (count($this->specialRows['footer'])) {
            $output[] = $this->renderArea($this->specialRows['footer'], 'tfoot');
        }

        $output[] = '</table>';

        return implode('', $output);
    }
272789
protected function buildDimensionField($dim)
    {
        $field = TextField::create(
            sprintf('%s[%s]', $this->getName(), $dim),
            $this->getDimensionLabel($dim)
        );
        
        return $field;
    }
992511
public function format(array $rows, array $headers = []) : string
    {
        if (count($rows) === 0) {
            return '';
        }

        foreach ($rows as &$row) {
            $row = (array)$row;
        }

        unset($row);

        // If there are headers, we want them to be formatted along with the rows
        $headersAndRows = count($headers) === 0 ? $rows : array_merge([$headers], $rows);
        $headersAndRows = count($headers) === 0 ? $rows : array_merge([$headers], $rows);
        $maxLengths = $this->padding->normalizeColumns($headersAndRows);
        $eolChar = $this->padding->getEolChar();
        $rowText = explode($eolChar, $this->padding->format($headersAndRows, function ($row) {
            return sprintf(
                '%s%s%s%s%s',
                $this->verticalBorderChar,
                $this->cellPaddingString,
                implode($this->cellPaddingString . $this->verticalBorderChar . $this->cellPaddingString, $row),
                $this->cellPaddingString,
                $this->verticalBorderChar
            );
        }));

        // Create the borders
        $borders = [];

        foreach ($maxLengths as $maxLength) {
            $borders[] = str_repeat($this->horizontalBorderChar, $maxLength + 2 * mb_strlen($this->cellPaddingString));
        }

        $borderText = $this->intersectionChar . implode($this->intersectionChar, $borders) . $this->intersectionChar;
        $headerText = count($headers) > 0 ? array_shift($rowText) . $eolChar . $borderText . $eolChar : '';

        return $borderText . $eolChar . $headerText . implode($eolChar, $rowText) . $eolChar . $borderText;
    }
611185
public function render() : string
    {
        // assign data if any
        if (\func_num_args() > 0) {
            // php 7.2.0 is crazy
            $args = \func_get_args();
            $this->assign($args[0]);
        }

        $result = '';
        $shared = [];

        foreach ($this as $box) {
            // if box has no shared data
            if ($box->child === $box) {
                // render, concat, and continue
                $result .= $box->renderer->render($box->interior, $box->data);
                continue;
            }

            // cache union sets of shared data arrays using root as key
            $root = $box->find();
            $key = \spl_object_hash($root);
            if (!isset($shared[$key])) {
                $shared[$key] = [];
                $shared[$key][] = &$root->data;
                for ($i = $root->child; $i !== $root; $i = $i->child) {
                    $shared[$key][] = &$i->data;
                }
            }

            // render with shared data and concat results
            $result .= $box->renderer->render($box->interior, $box->data, $shared[$key]);
        }

        return $result;
    }
1274695
public static function render(array $parameters)
    {
        list($sortColumn, $sortParameter, $title, $queryParameters, $anchorAttributes) = self::parseParameters($parameters);

        $title = self::applyFormatting($title);

        if ($mergeTitleAs = config('columnsortable.inject_title_as', null)) {
            request()->merge([$mergeTitleAs => $title]);
        }

        list($icon, $direction) = self::determineDirection($sortColumn, $sortParameter);

        $trailingTag = self::formTrailingTag($icon);

        $anchorClass = self::getAnchorClass($sortParameter, $anchorAttributes);

        $anchorAttributesString = self::buildAnchorAttributesString($anchorAttributes);

        $queryString = self::buildQueryString($queryParameters, $sortParameter, $direction);

        return '<a'.$anchorClass.' href="'.url(request()->path().'?'.$queryString).'"'.$anchorAttributesString.'>'.htmlentities($title).$trailingTag;
    }
437170
public function render(string $view, array $variables = []): string
	{
		return $this->create($view, $variables)->render();
	}
1083527
protected function getSelectDimensions($dimensions, $tableName, $appendSelectAs = true)
    {
        foreach ($dimensions as $selectAs => &$field) {
            $selectAsString = $field;

            if (!is_numeric($selectAs)) {
                $selectAsString = $selectAs;
            } else if ($this->isFieldFunctionOrComplexExpression($field)) {
                // if complex expression has a select as, use it
                if (!$appendSelectAs && preg_match('/\s+AS\s+(.*?)\s*$/', $field, $matches)) {
                    $field = $matches[1];
                    continue;
                }

                // if function w/o select as, do not alias or prefix
                $selectAsString = $appendSelectAs = false;
            }

            $isKnownField = !in_array($field, array('referrer_data'));

            if ($selectAsString == $field && $isKnownField) {
                $field = $this->prefixColumn($field, $tableName);
            }

            if ($appendSelectAs && $selectAsString) {
                $field = $this->prefixColumn($field, $tableName) . $this->getSelectAliasAs($selectAsString);
            }
        }

        return $dimensions;
    }
475944
public function cleanIndex($dimensions)
    {
        foreach ($dimensions as $dimension) {
            $this->indexOperation->createIndex($this->indexName, $dimension->getValue());
        }

        return $this;
    }