Render Columns object
@param  SQL\Columns $item
@return string
340049
public static function renderItem(SQL\Columns $item)
    {
        return Compiler::braced(
            Arr::join(', ', Arr::map(__NAMESPACE__.'\Compiler::name', $item->all()))
        );
    }
1169416
private function renderImage($imageName, ImageColumn $column)
    {
        return $this->twig->render(
            'SgDatatablesBundle:Helper:ii_render_image.html.twig',
            array(
                'image_id' => 'sg_image_'.uniqid(rand(10000, 99999)),
                'image_name' => $imageName,
                'filter' => $column->getImagineFilter(),
                'path' => $column->getRelativePath(),
                'holder_url' => $column->getHolderUrl(),
                'width' => $column->getHolderWidth(),
                'height' => $column->getHolderHeight(),
                'enlarge' => $column->getEnlarge(),
            )
        );
    }
284734
public function renderCellTemplate($columnName)
    {
        if ($columnName == 'term_id' && isset($this->_columns[$columnName])) {
            $element = $this->elementFactory->create('hidden');
            $element->setId("term_id")->setName("term_id");
            $element->setForm($this->getForm())
                ->setName($this->_getCellInputElementName($columnName))
                ->setHtmlId($this->_getCellInputElementId('<%- _id %>', $columnName));

            return $element->getElementHtml();
        }

        if ($columnName == 'values' && isset($this->_columns[$columnName])) {
            $element = $this->elementFactory->create('textarea');
            $element->setCols($this->textAreaColsNumber)
                ->setForm($this->getForm())
                ->setName($this->_getCellInputElementName($columnName))
                ->setHtmlId($this->_getCellInputElementId('<%- _id %>', $columnName));

            return str_replace("\n", '', $element->getElementHtml());
        }

        return parent::renderCellTemplate($columnName);
    }
730888
public function render(ItemInterface $item, array $options = []): string
    {
        return $this->engine->render($options['template'], ['menu' => $item, 'options' => $options]);
    }
47998
public function renderCreateColumns()
    {
        $columns = $this->getTableColumns();

        if (!$columns) {
            return '';
        }

        $source = '';

        foreach ($columns as $column) {
            $attributes = [$this->serializeArrayToAttributes($column->getName())];
            $type       = $column->getType()->getName();

            switch ($type) {
                case Type::INTEGER:
                    $method = 'integer';
                    break;
                case Type::SMALLINT:
                    $method = 'smallInteger';
                    break;
                case Type::BIGINT:
                    $method = 'bigInteger';
                    break;
                case Type::STRING:
                    $attributes[] = $column->getLength();
                    $method       = 'string';
                    break;
                case Type::GUID:
                case Type::TEXT:
                    $method = 'text';
                    break;
                case Type::FLOAT:
                    $method = 'float';
                    break;
                case Type::DECIMAL:
                    $attributes[] = $column->getPrecision();
                    $attributes[] = $column->getScale();
                    $method       = 'decimal';
                    break;
                case Type::BOOLEAN:
                    $method = 'boolean';
                    break;
                case Type::DATETIME:
                case Type::DATETIMETZ:
                    $method = 'dateTime';
                    break;
                case Type::DATE:
                    $method = 'date';
                    break;
                case Type::TIME:
                    $method = 'time';
                    break;
                case Type::BINARY:
                case Type::BLOB:
                    $method = 'binary';
                    break;
                case Type::JSON_ARRAY:
                    $method = 'json';
                    break;
                default:
                    throw new DbExporterException('Not supported database column type' . $type);
                    break;
            }

            $source .= '$table->' . $method . '(' . implode(', ', $attributes) . ')';
            if ($column->getUnsigned()) {
                $source .= "\n" . '      ->unsigned()';
            }
            if (!$column->getNotnull()) {
                $source .= "\n" . '      ->nullable()';
            }
            if ($column->getDefault() || $column->getDefault() === null && !$column->getNotnull()) {
                $source .= "\n" . '      ->default(' . var_export($column->getDefault(), true) . ')';
            }
            $source .= ';' . "\n";
        }

        return trim($source);
    }
427484
protected function renderItemIcon($item)
    {
        $iconClass = ArrayHelper::getValue($item, 'icon');
        if ($iconClass !== null) {
            $class = [$this->iconClass];
            Html::addCssClass($class, $iconClass);
            return Html::tag('i', '', ['class' => $class]);
        } else {
            return '';
        }
    }
829940
private function renderItem($item)
    {
        $this->response = $this->response->withBody(stream_for($this->getRenderedItem($item)));
    }
237943
function render_file($item)
    {
        if ($item['name'] === '')
        {
            Eresus_Kernel::app()->getPage()->addErrorMessage(
                sprintf(errFormFieldHasNoName, $item['type'], $this->form['name']));
        }
        $result = "\t\t".'<tr><td class="formLabel">'.$item['label']."</td><td><input type=\"file\" name=\"".$item['name']."\"".(isset($item['width']) ? ' size="'.$item['width'].'"':'').$this->attrs($item)." />".$item['comment']."</td></tr>\n";
        $this->file = true;
        return $result;
    }
776009
protected function printFeedbackItem(string $item)
    {
        echo $item;
        ++$this->column;
        ++$this->casesProcessed;
        if ($this->column === $this->maxColumn) {
            echo $this->getProgress();
            $this->println();
        }
    }
579733
function column_title( $item ) {

		list( $user_id, $blog_id ) = explode( ':', $item['ID'] );

		// Build row actions
		$actions = [
			'visit' => sprintf( '<a href="%s">%s</a>', get_home_url( $blog_id ), __( 'Visit Book' ) ),
		];

		// Only include admin link if user has admin rights to the book in question
		if ( is_super_admin( $user_id ) || is_user_member_of_blog( $user_id, $blog_id ) ) {
			$actions['dashboard'] = sprintf( '<a href="%s">%s</a>', get_admin_url( $blog_id ), __( 'Visit Admin', 'pressbooks' ) );
		}

		// Return the title contents
		return sprintf(
			'<span class="title">%1$s</span> %2$s',
			$item['title'],
			$this->row_actions( $actions )
		);
	}
650598
protected function renderItem($item)
	{
		if (isset($item['url'])) {
			if($this->useSprites) {
				$spriteUrl = $this->spriteUrl;
				$item['template'] = "<a href=\"{url}\" style=\"background: no-repeat 0 {$this->itemOffset}px url($spriteUrl);\">{label}</a>";
				$this->itemOffset -= 16;
			} else {
				$components = parse_url($item['url']);
				$iconUrl = $this->iconizerBaseUrl . $components['host'];
				$item['template'] = "<a href=\"{url}\" style=\"background: no-repeat url($iconUrl)\">{label}</a>";
			}
		}
		return parent::renderItem($item);
	}
775338
public function renderTableRow($record, $col)
    {
        switch (array_get($col, 'type', 'text')) {
            case 'yes_no':
                return $record->yes_no($record->{$col['db_field']});
                break;
            case 'format_default_date':
                return $record->formatDefaultData($record->{$col['db_field']});
                break;
            case 'sort':
                return '<div class="fa fa-sort sortable-handle"></div>';
                break;
            case 'relation':
                return $record->{$col['relation']}->{$col['db_field']};
                break;
            case 'translation':
                $locale = config('app.locale', 'en');
                $i18n = I18n::select('id')->where('locale', $locale)->first();
                if ($i18n) {
                    $i18nId = $i18n->id;

                    return $record->translate(1)->{$col['db_field']};
                }

                return 'No translation';
                break;
            default:
                return $record->{$col['db_field']};
                break;
        }
    }
1189745
protected function _renderItem(ItemInterface $item, array $options)
    {
        if (!$item->isDisplayed()) {
            return '';
        }

        $level = $item->getLevel();

        $class = (array)$item->getAttribute('class');

        if ($this->_matcher->isCurrent($item)) {
            $class[] = $options['currentClass'];
        } elseif (isset($options['ancestorClass']) &&
            $this->_matcher->isAncestor($item, $options['matchingDepth'])
        ) {
            $class[] = $options['ancestorClass'];
        }

        if (isset($options['firstClass']) &&
            $item->actsLikeFirst()
        ) {
            $class[] = $options['firstClass'];
        }
        if (isset($options['lastClass']) &&
            $item->actsLikeLast()
        ) {
            $class[] = $options['lastClass'];
        }

        $hasChildren = $item->hasChildren();
        if ($hasChildren &&
            $options['depth'] !== 0
        ) {
            if ($options['branchClass'] !== null &&
                $item->getDisplayChildren()
            ) {
                $class[] = $options['branchClass'];
            }
        } elseif ($options['leafClass'] !== null) {
            $class[] = $options['leafClass'];
        }

        $attributes = $item->getAttributes();
        if (!empty($class)) {
            $attributes['class'] = implode(' ', $class);
        }

        $templater = $this->templater();

        $attributes = $this->_formatAttributes($attributes, $item);

        $templates = (array)$item->getExtra('templates');
        $defaultTemplates = (array)$item->getExtra('defaultTemplates');
        $newTemplates = $templates + $defaultTemplates;
        if ($newTemplates) {
            $templater->push();
            $templater->add($newTemplates);
        }

        $templateVars = (array)$item->getExtra('templateVars');
        $defaultTemplateVars = (array)$item->getExtra('defaultTemplateVars');
        $currentDefaultTemplateVars = (array)$options['defaultTemplateVars'];
        $templateVars =
            $templateVars +
            $defaultTemplateVars +
            $currentDefaultTemplateVars;
        if (empty($templateVars)) {
            $templateVars = null;
        }
        $options['templateVars'] = $templateVars;

        $link = $this->_renderLink($item, $options);

        if ($hasChildren) {
            $nestedClass = (array)$item->getChildrenAttribute('class');
            if ($options['menuLevelClass'] !== null) {
                $nestedClass[] = $options['menuLevelClass'] . $level;
            }
            if ($options['nestedMenuClass'] !== null) {
                $nestedClass[] = $options['nestedMenuClass'];
            }
            $nestedAttributes = $item->getChildrenAttributes();
            $nestedAttributes['class'] = implode(' ', $nestedClass);
            $options['attributes'] = $nestedAttributes;

            $options['childrenTemplates'] = null;
            if ($newTemplates) {
                // item defines new templates that must be ignored by the children
                $options['childrenTemplates'] = $options['defaultTemplates'];
            }
            if ($defaultTemplates) {
                // item defines default templates that must be used by the children
                $options['childrenTemplates'] = $defaultTemplates;
            }

            if ($defaultTemplateVars) {
                // item defines default template vars that must be used by the children
                $options['defaultTemplateVars'] =
                    $defaultTemplateVars +
                    $currentDefaultTemplateVars;
            }

            $nested = $this->_renderNested($item, $options);
        } else {
            $nested = '';
        }

        $rendered = (string)$templater->format('item', [
            'attrs' => $attributes,
            'templateVars' => $templateVars,
            'link' => $link,
            'nest' => $nested
        ]);

        if ($newTemplates) {
            $templater->pop();
        }

        return $rendered;
    }
280667
public function renderItem( $item ) {

        $label      = null;
        $url        = isset( $item[ 'url' ] ) ? $item[ 'url' ] : null;
		$urlOptions	= isset( $item[ 'urlOptions' ] ) ? $item[ 'urlOptions' ] : null;
        $options    = [];

		// Check whether label is required
		if( $this->label ) {

	        if( !isset( $item[ 'label' ] ) ) {

	            throw new InvalidConfigException( "The 'label' option is required." );
	        }

	        $label = $item[ 'label' ];
		}

		// Check whether icon is required
		if( $this->icon ) {

	        if( !isset( $item[ 'icon' ] ) ) {

	            throw new InvalidConfigException( "The 'icon' option is required." );
	        }

			$icon	= Html::tag( 'i', null, [ 'class' =>  $item[ 'icon' ] ] );
			$label	= "<span class='wrap-icon'>$icon</span><span class='wrap-text'>$label</span>";
		}

		if( isset( $item[ 'options' ] ) ) {

			$options = $item[ 'options' ];
		}

		if( isset( $url ) ) {

			$link = Html::a( $label, $url, $urlOptions );
		}

		// Custom Links
		if( isset( $options[ 'action' ] ) ) {

			$urlOptions[ 'link' ] = $url;

			$link = Html::tag( 'span', $label, $urlOptions );
		}

		// Custom HTML
		if( isset( $options[ 'html' ] ) ) {

			$link = $options[ 'html' ];

			unset( $options[ 'html' ] );
		}

        return Html::tag( 'li', $link, $options );
    }
1043016
public function renderItem($item)
    {
        if (is_string($item)) {
            return $item;
        }
        if (!isset($item['label'])) {
            throw new InvalidConfigException("The 'label' option is required.");
        }
        $encodeLabel = isset($item['encode']) ? $item['encode'] : $this->encodeLabels;
        $label = $encodeLabel ? Html::encode($item['label']) : $item['label'];
        $options = array_merge($this->itemOptions, ArrayHelper::getValue($item, 'options', []));
        $url = ArrayHelper::getValue($item, 'url', '#');
        $linkOptions = ArrayHelper::getValue($item, 'linkOptions', []);
        $iconOptions = ArrayHelper::getValue($item, 'icon', []);

        if (isset($item['active'])) {
            $active = ArrayHelper::remove($item, 'active', false);
        } else {
            $active = $this->isItemActive($item);
        }

        if ($this->activateItems && $active) {
            Html::addCssClass($options, 'active');
        }
        $icon = '';
        if ($iconOptions) {
            $icon = Html::tag('span', '', ['class' => $iconOptions]) . ' ';
        }

        return Html::a($icon . $label, $url, array_merge($linkOptions, $options));
    }
35579
private function renderRowContent($index = null, $item = null)
    {
        $elements = [];
        $columnIndex = 0;
        foreach ($this->columns as $column) {
            /* @var $column BaseColumn */
            $column->setModel($item);
            $elements[] = $this->renderCellContent($column, $index, $columnIndex++);
        }

        $content = Html::tag('div', implode("\n", $elements), $this->prepareRowOptions($index, $item));
        if ($index !== null) {
            $content = str_replace('{' . $this->getIndexPlaceholder() . '}', $index, $content);
        }

        return $content;
    }
1094550
protected function prepareColumn(Column $column)
    {
        if ($column->getType() === SqlsrvType::FLOAT && strpos($column->getLength(), ',') !== false) {
            $column->length(24);
        }

        if ($column->getType() === SqlsrvType::DOUBLE && strpos($column->getLength(), ',') !== false) {
            $column->length(53);
        }

        if (in_array($column->getType(), [SqlsrvType::TEXT, SqlsrvType::LONGTEXT], true)) {
            $column->length('max');
        }

        $column = parent::prepareColumn($column);

        if (SqlsrvType::noLength($column->getType())) {
            $column->length(null);
        }

        return $column;
    }