Transforms this configuration group into HTML formatted table.
Options are sorted alphabetically by key.

@param options list of options to include in this group
@return string containing HTML formatted table
430502
private static String toHtmlTable(final List<OptionWithMetaInfo> options) {
		StringBuilder htmlTable = new StringBuilder();
		htmlTable.append("<table class=\"table table-bordered\">\n");
		htmlTable.append("    <thead>\n");
		htmlTable.append("        <tr>\n");
		htmlTable.append("            <th class=\"text-left\" style=\"width: 20%\">Key</th>\n");
		htmlTable.append("            <th class=\"text-left\" style=\"width: 15%\">Default</th>\n");
		htmlTable.append("            <th class=\"text-left\" style=\"width: 65%\">Description</th>\n");
		htmlTable.append("        </tr>\n");
		htmlTable.append("    </thead>\n");
		htmlTable.append("    <tbody>\n");

		for (OptionWithMetaInfo option : options) {
			htmlTable.append(toHtmlString(option));
		}

		htmlTable.append("    </tbody>\n");
		htmlTable.append("</table>\n");

		return htmlTable.toString();
	}
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;
    }
857686
public function HTMLToTable($html, GrabzItTableOptions $options = null)
	{
		if ($options == null)
		{
			$options = new GrabzItTableOptions();			
		}		

		$this->request = new GrabzItRequest($this->getRootUrl(true) . GrabzItClient::TakeTable, true, $options, $html);
	}
97145
public ServiceCall<HTMLReturn> convertToHtml(ConvertToHtmlOptions convertToHtmlOptions) {
    Validator.notNull(convertToHtmlOptions, "convertToHtmlOptions cannot be null");
    String[] pathSegments = { "v1/html_conversion" };
    RequestBuilder builder = RequestBuilder.post(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments));
    builder.query("version", versionDate);
    Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("compare-comply", "v1", "convertToHtml");
    for (Entry<String, String> header : sdkHeaders.entrySet()) {
      builder.header(header.getKey(), header.getValue());
    }
    builder.header("Accept", "application/json");
    if (convertToHtmlOptions.model() != null) {
      builder.query("model", convertToHtmlOptions.model());
    }
    MultipartBody.Builder multipartBuilder = new MultipartBody.Builder();
    multipartBuilder.setType(MultipartBody.FORM);
    RequestBody fileBody = RequestUtils.inputStreamBody(convertToHtmlOptions.file(), convertToHtmlOptions
        .fileContentType());
    multipartBuilder.addFormDataPart("file", convertToHtmlOptions.filename(), fileBody);
    builder.body(multipartBuilder.build());
    return createServiceCall(builder.build(), ResponseConverterUtils.getObject(HTMLReturn.class));
  }
554106
private function getMergedOptions(array $options)
    {
        $options = array_merge(
            $this->getDefaultOptions(),
            $options
        );

        if (isset($options['formats'])) {
            $options['formats'] = self::mergeFormats($this->getDefaultFormats(), $options['formats']);
        } else {
            $options['formats'] = $this->getDefaultFormats();
        }

        if (is_null($options['line_ending'])) {
            $options['line_ending'] = $options['type'] === 'html' ? '<br/>' : "\n";
        }

        if (is_null($options['indentation'])) {
            $options['indentation'] = $options['type'] === 'html' ? '&nbsp;&nbsp;&nbsp;&nbsp;' : '    ';
        }

        // `parts_newline` requires `clause_newline`
        $options['parts_newline'] &= $options['clause_newline'];

        return $options;
    }
780967
protected function _groupTemplate($options)
    {
        $groupTemplate = $options['options']['type'] . 'FormGroup';
        if (!$this->templater()->get($groupTemplate)) {
            $groupTemplate = 'formGroup';
        }

        return $this->formatTemplate($groupTemplate, [
            'input' => $options['input'],
            'label' => $options['label'],
            'error' => $options['error'],
            'templateVars' => $this->_processTemplateVars($options)
        ]);
    }
560394
public CharSequence getJavaScriptOptions()
	{
		StringBuilder sb = new StringBuilder();
		this.optionsRenderer.renderBefore(sb);
		int count = 0;
		for (Entry<String, Object> entry : options.entrySet())
		{
			String key = entry.getKey();
			Object value = entry.getValue();
			if (value instanceof IModelOption< ? >)
				value = ((IModelOption< ? >) value).wrapOnAssignment(owner);
			boolean isLast = !(count < options.size() - 1);
			if (value instanceof JsScope)
			{
				// Case of a JsScope
				sb.append(this.optionsRenderer.renderOption(key, ((JsScope) value).render(), isLast));
			}
			else if (value instanceof ICollectionItemOptions)
			{
				// Case of an ICollectionItemOptions
				sb.append(this.optionsRenderer.renderOption(key,
					((ICollectionItemOptions) value).getJavascriptOption(), isLast));
			}
			else if (value instanceof IComplexOption)
			{
				// Case of an IComplexOption
				sb.append(this.optionsRenderer.renderOption(key,
					((IComplexOption) value).getJavascriptOption(), isLast));
			}
			else if (value instanceof ITypedOption< ? >)
			{
				// Case of an ITypedOption
				sb.append(this.optionsRenderer.renderOption(key,
					((ITypedOption< ? >) value).getJavascriptOption(), isLast));
			}
			else
			{
				// Other cases
				sb.append(this.optionsRenderer.renderOption(key, value, isLast));
			}
			count++;
		}
		this.optionsRenderer.renderAfter(sb);
		return sb;
	}
349676
private List<FormatterOption> getFormatterOptions(CmsObject cms, CmsResource resource) {

        List<FormatterOption> options = new ArrayList<FormatterOption>();
        Set<String> containerTypes = new HashSet<>();
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_displayContainerTypeConfig)) {
            String types = null;

            if (CmsPropertyDefinition.PROPERTY_TEMPLATE_DISPLAY_TYPES.equals(m_displayContainerTypeConfig)) {
                try {
                    CmsProperty prop = cms.readPropertyObject(
                        resource,
                        CmsPropertyDefinition.PROPERTY_TEMPLATE_DISPLAY_TYPES,
                        true);
                    String propValue = prop.getValue();
                    if (!CmsStringUtil.isEmptyOrWhitespaceOnly(propValue)) {
                        types = propValue;
                    } else {
                        // look up template property
                        try {
                            CmsTemplateLoaderFacade loaderFacade = OpenCms.getResourceManager().getTemplateLoaderFacade(
                                cms,
                                null,
                                resource,
                                CmsPropertyDefinition.PROPERTY_TEMPLATE);
                            CmsResource template = loaderFacade.getLoaderStartResource();
                            if (template != null) {
                                prop = cms.readPropertyObject(
                                    template,
                                    CmsPropertyDefinition.PROPERTY_TEMPLATE_DISPLAY_TYPES,
                                    false);
                                propValue = prop.getValue();
                                if (!CmsStringUtil.isEmptyOrWhitespaceOnly(propValue)) {
                                    types = propValue;
                                }
                            }
                        } catch (Exception ex) {
                            LOG.debug(ex.getMessage(), ex);
                        }
                    }
                } catch (CmsException e) {
                    LOG.warn(e.getLocalizedMessage(), e);
                }
            } else {
                types = m_displayContainerTypeConfig;
            }
            if (types != null) {
                containerTypes.addAll(Arrays.asList(types.split(TYPES_SPLITTER)));
            }
        }
        CmsADEConfigData config = OpenCms.getADEManager().lookupConfiguration(cms, resource.getRootPath());

        if (config != null) {
            Locale wpLocale = OpenCms.getWorkplaceManager().getWorkplaceLocale(cms);
            for (I_CmsFormatterBean formatter : config.getDisplayFormatters(cms)) {
                if (!containerTypes.isEmpty()) {
                    if (Sets.intersection(containerTypes, formatter.getContainerTypes()).isEmpty()) {
                        continue;
                    }
                }
                for (String typeName : formatter.getResourceTypeNames()) {
                    String label = formatter.getNiceName(wpLocale)
                        + " ("
                        + CmsWorkplaceMessages.getResourceTypeName(wpLocale, typeName)
                        + ")";
                    options.add(
                        new FormatterOption(
                            typeName + CmsXmlDisplayFormatterValue.SEPARATOR + formatter.getId(),
                            typeName,
                            getDisplayType(formatter),
                            label,
                            formatter.getRank()));
                }
            }
        }
        Collections.sort(options, new FormatterComparator());
        return options;
    }
864945
private int renderOptions(StringBuilder sb, Collection<Option> options) {
        String lpad = OptionUtils.createPadding(getLeftPad());
        String dpad = OptionUtils.createPadding(getDescPad());

        // first create list containing only <lpad>-a,--aaa where 
        // -a is opt and --aaa is long opt; in parallel look for 
        // the longest opt string this list will be then used to 
        // sort options ascending
        int leftWidth = 0;
        List<StringBuilder> lineBufList = new ArrayList<>();
        Collection<Option> optList = options;
        if (optList.size() > 1 && getOptionComparator() != null) {
            List<Option> optList2 = new ArrayList<>(optList);
            optList2.sort(getOptionComparator());
            optList = optList2;
        }
        for (Option option : optList) {
            StringBuilder lineBuf = new StringBuilder();
            if (option.getName() == null) {
                lineBuf.append(lpad).append(LONG_OPTION_PREFIX).append(option.getLongName());
            } else {
                lineBuf.append(lpad).append(OPTION_PREFIX).append(option.getName());
                if (option.hasLongName()) {
                    lineBuf.append(", ").append(LONG_OPTION_PREFIX).append(option.getLongName());
                }
            }
            if (option.hasValue()) {
                String argName = option.getValueName();
                if (argName != null && argName.isEmpty()) {
                    // if the option has a blank arg name
                    lineBuf.append(' ');
                } else {
                    lineBuf.append(option.isWithEqualSign() ? '=' : LONG_OPTION_SEPARATOR);
                    lineBuf.append(ARG_BRACKET_OPEN).append(argName != null ? argName : getArgName()).append(ARG_BRACKET_CLOSE);
                }
            }
            lineBufList.add(lineBuf);
            leftWidth = (lineBuf.length() > leftWidth ? lineBuf.length() : leftWidth);
        }

        if (leftWidth > getMaxLeftWidth()) {
            leftWidth = getMaxLeftWidth();
        }

        int x = 0;
        for (Iterator<Option> it = optList.iterator(); it.hasNext();) {
            Option option = it.next();
            StringBuilder lineBuf = lineBufList.get(x++);
            if (lineBuf.length() <= leftWidth) {
                if (lineBuf.length() < leftWidth) {
                    lineBuf.append(OptionUtils.createPadding(leftWidth - lineBuf.length()));
                }
                lineBuf.append(dpad);
                if (option.getDescription() != null) {
                    lineBuf.append(option.getDescription());
                }
                renderWrappedText(sb, getWidth(), leftWidth + getDescPad(), lineBuf.toString());
            } else {
                sb.append(lineBuf).append(NEW_LINE);
                if (option.getDescription() != null) {
                    String line = OptionUtils.createPadding(leftWidth + getDescPad()) + option.getDescription();
                    renderWrappedText(sb, getWidth(), leftWidth + getDescPad(), line);
                }
            }
            if (it.hasNext()) {
                sb.append(NEW_LINE);
            }
        }
        return leftWidth;
    }
1200492
public OptionsBuilder configurationFormat(String configurationFormat){
		String aux = configurationFormat.toLowerCase().trim();
		if(aux.equals("yaml") || aux.equals("json")){
			aux = "yml";
		}
		if (aux.equals("xml") || aux.equals("yml")) {
			options.put(Options.CONFIGURATION_FILE_FORMAT, aux);
		} else {
			throw new IllegalArgumentException("The configuration format "+aux+" is not supported");
		}
		return this;
	}
277847
def to_html( options = {} )
      # find out how deep it is
      d = [s.text_value.size, e.text_value.size].min
      sn = s.text_value.size - d
      en = e.text_value.size - d
      if sn > 0
        "<h#{d}>#{'=' * sn} #{label( :html, options )}</h#{d}>"
      elsif en > 0
        "<h#{d}>#{label( :html, options )} #{'=' * en}</h#{d}>"
      else
        "<h#{d}>#{label( :html, options )}</h#{d}>"
      end
    end
866182
public static String getTinyMceBlockFormats(String formatSelectOptions) {

        String[] options = formatSelectOptions.split(";");
        List<String> resultParts = Lists.newArrayList();
        for (String option : options) {
            String label = TINYMCE_DEFAULT_BLOCK_FORMAT_LABELS.get(option);
            if (label == null) {
                label = option;
            }
            resultParts.add(label + "=" + option);
        }
        String result = CmsStringUtil.listAsString(resultParts, ";");
        return result;
    }
388286
public String optionsToHtml(int refillWidth) {
    StringJoiner b = new StringJoiner(lineSep);

    if (includeClassDoc && root.classes().length > 0) {
      b.add(OptionsDoclet.javadocToHtml(root.classes()[0]));
      b.add("<p>Command line options:</p>");
    }

    b.add("<ul>");
    if (!options.hasGroups()) {
      b.add(optionListToHtml(options.getOptions(), 6, 2, refillWidth));
    } else {
      for (Options.OptionGroupInfo gi : options.getOptionGroups()) {
        // Do not include groups without publicized options in output
        if (!gi.anyPublicized()) {
          continue;
        }

        String ogroupHeader =
            "  <li id=\"optiongroup:"
                + gi.name.replace(" ", "-").replace("/", "-")
                + "\">"
                + gi.name;
        b.add(refill(ogroupHeader, 6, 2, refillWidth));
        b.add("      <ul>");
        b.add(optionListToHtml(gi.optionList, 12, 8, refillWidth));
        b.add("      </ul>");
        // b.add("  </li>");
      }
    }
    b.add("</ul>");

    for (Options.OptionInfo oi : options.getOptions()) {
      if (oi.list != null && !oi.unpublicized) {
        b.add("");
        b.add(LIST_HELP);
        break;
      }
    }

    return b.toString();
  }
1361834
public String html() {
        StringBuilder accum = StringUtil.borrowBuilder();
        html(accum);
        String html = StringUtil.releaseBuilder(accum);
        return NodeUtils.outputSettings(this).prettyPrint() ? html.trim() : html;
    }
313883
public static function generate_transformation_string(&$options = array())
    {
        $generate_base_transformation = "Cloudinary::generate_base_transformation";
        if (is_string($options)) {
            return $options;
        }
        if ($options == array_values($options)) {
            return implode("/", array_map($generate_base_transformation, $options));
        }

        $responsive_width = Cloudinary::option_consume(
            $options,
            "responsive_width",
            Cloudinary::config_get("responsive_width")
        );

        $size = Cloudinary::option_consume($options, "size");
        if ($size) {
            list($options["width"], $options["height"]) = preg_split("/x/", $size);
        }

        $width = Cloudinary::option_get($options, "width");
        $height = Cloudinary::option_get($options, "height");

        $has_layer = Cloudinary::option_get($options, "underlay") || Cloudinary::option_get($options, "overlay");
        $angle = implode(Cloudinary::build_array(Cloudinary::option_consume($options, "angle")), ".");
        $crop = Cloudinary::option_consume($options, "crop");

        $no_html_sizes = $has_layer || !empty($angle) || $crop == "fit" || $crop == "limit" || $responsive_width;

        if (strlen($width) == 0 || $width &&
            (substr($width, 0, 4) == "auto" || floatval($width) < 1 || $no_html_sizes)) {
            unset($options["width"]);
        }
        if (strlen($height) == 0 || $height && (floatval($height) < 1 || $no_html_sizes)) {
            unset($options["height"]);
        }

        $background = Cloudinary::option_consume($options, "background");
        if ($background) {
            $background = preg_replace("/^#/", 'rgb:', $background);
        }
        $color = Cloudinary::option_consume($options, "color");
        if ($color) {
            $color = preg_replace("/^#/", 'rgb:', $color);
        }

        $base_transformations = Cloudinary::build_array(Cloudinary::option_consume($options, "transformation"));
        if (count(array_filter($base_transformations, "is_array")) > 0) {
            $base_transformations = array_map($generate_base_transformation, $base_transformations);
            $named_transformation = "";
        } else {
            $named_transformation = implode(".", $base_transformations);
            $base_transformations = array();
        }

        $effect = Cloudinary::option_consume($options, "effect");
        if (is_array($effect)) {
            $effect = implode(":", $effect);
        }

        $border = Cloudinary::process_border(Cloudinary::option_consume($options, "border"));

        $flags = implode(Cloudinary::build_array(Cloudinary::option_consume($options, "flags")), ".");
        $dpr = Cloudinary::option_consume($options, "dpr", Cloudinary::config_get("dpr"));

        $duration = Cloudinary::norm_range_value(Cloudinary::option_consume($options, "duration"));
        $start_offset = Cloudinary::norm_auto_range_value(Cloudinary::option_consume($options, "start_offset"));
        $end_offset = Cloudinary::norm_range_value(Cloudinary::option_consume($options, "end_offset"));
        $offset = Cloudinary::split_range(Cloudinary::option_consume($options, "offset"));
        if (!empty($offset)) {
            $start_offset = Cloudinary::norm_auto_range_value($offset[0]);
            $end_offset = Cloudinary::norm_range_value($offset[1]);
        }

        $video_codec = Cloudinary::process_video_codec_param(Cloudinary::option_consume($options, "video_codec"));
        $fps = Cloudinary::process_fps(Cloudinary::option_consume($options, "fps"));
        $keyframe_interval = Cloudinary::process_keyframe_interval(Cloudinary::option_consume($options, "keyframe_interval"));

        $overlay = Cloudinary::process_layer(Cloudinary::option_consume($options, "overlay"), "overlay");
        $underlay = Cloudinary::process_layer(Cloudinary::option_consume($options, "underlay"), "underlay");
        $if = Cloudinary::process_if(Cloudinary::option_consume($options, "if"));
        $custom_function = Cloudinary::process_custom_function(Cloudinary::option_consume($options, "custom_function"));
        $custom_pre_function = Cloudinary::process_custom_pre_function(Cloudinary::option_consume($options, "custom_pre_function"));
        $aspect_ratio = Cloudinary::option_consume($options, "aspect_ratio");
        $opacity = Cloudinary::option_consume($options, "opacity");
        $quality = Cloudinary::option_consume($options, "quality");
        $radius = Cloudinary::process_radius(Cloudinary::option_consume($options, "radius"));
        $x = Cloudinary::option_consume($options, "x");
        $y = Cloudinary::option_consume($options, "y");
        $zoom = Cloudinary::option_consume($options, "zoom");

        $params = array(
            "a" => self::normalize_expression($angle),
            "ar" => self::normalize_expression($aspect_ratio),
            "b" => $background,
            "bo" => $border,
            "c" => $crop,
            "co" => $color,
            "dpr" => self::normalize_expression($dpr),
            "du" => $duration,
            "e" => self::normalize_expression($effect),
            "eo" => $end_offset,
            "fl" => $flags,
            "fn" => $custom_function ?: $custom_pre_function,
            "fps" => $fps,
            "ki" => $keyframe_interval,
            "h" => self::normalize_expression($height),
            "l" => $overlay,
            "o" => self::normalize_expression($opacity),
            "q" => self::normalize_expression($quality),
            "r" => $radius,
            "so" => $start_offset,
            "t" => $named_transformation,
            "u" => $underlay,
            "vc" => $video_codec,
            "w" => self::normalize_expression($width),
            "x" => self::normalize_expression($x),
            "y" => self::normalize_expression($y),
            "z" => self::normalize_expression($zoom),
        );

        $simple_params = array(
            "ac" => "audio_codec",
            "af" => "audio_frequency",
            "br" => "bit_rate",
            "cs" => "color_space",
            "d" => "default_image",
            "dl" => "delay",
            "dn" => "density",
            "f" => "fetch_format",
            "g" => "gravity",
            "p" => "prefix",
            "pg" => "page",
            "sp" => "streaming_profile",
            "vs" => "video_sampling",
        );

        foreach ($simple_params as $param => $option) {
            $params[$param] = Cloudinary::option_consume($options, $option);
        }

        $variables = !empty($options["variables"]) ? $options["variables"] : [];

        $var_params = [];
        foreach ($options as $key => $value) {
            if (preg_match('/^\$/', $key)) {
                $var_params[] = $key . '_' . self::normalize_expression((string)$value);
            }
        }

        sort($var_params);

        if (!empty($variables)) {
            foreach ($variables as $key => $value) {
                $var_params[] = $key . '_' . self::normalize_expression((string)$value);
            }
        }

        $variables = join(',', $var_params);


        $param_filter = function ($value) {
            return $value === 0 || $value === '0' || trim($value) == true;
        };
        $params = array_filter($params, $param_filter);
        ksort($params);
        if (isset($if)) {
            $if = 'if_' . $if;
        }
        $join_pair = function ($key, $value) {
            return $key . "_" . $value;
        };
        $transformation = implode(",", array_map($join_pair, array_keys($params), array_values($params)));
        $raw_transformation = Cloudinary::option_consume($options, "raw_transformation");
        $transformation = implode(",", array_filter(array($if, $variables, $transformation, $raw_transformation)));
        array_push($base_transformations, $transformation);
        if ($responsive_width) {
            $responsive_width_transformation = Cloudinary::config_get(
                "responsive_width_transformation",
                Cloudinary::$DEFAULT_RESPONSIVE_WIDTH_TRANSFORMATION
            );
            array_push(
                $base_transformations,
                Cloudinary::generate_transformation_string($responsive_width_transformation)
            );
        }
        if (substr($width, 0, 4) == "auto" || $responsive_width) {
            $options["responsive"] = true;
        }
        if (substr($dpr, 0, 4) == "auto") {
            $options["hidpi"] = true;
        }

        return implode("/", array_filter($base_transformations));
    }
813075
static public function formatQueryOptions($options=null)
    {
        if (!isset($options)) {
            return [];
        }
        
        if (is_scalar($options)) {
            $options = ['where' => [$options]];
        } elseif (isset($options['where'])) {
            $options['where'] = (array) $options['where'];
        } else {
            $isWhere = true;
            foreach ($options as $k => $v) {
                if (is_numeric($k)) {
                    unset($options[$k]);
                    $options['where'][] = $v;
                } elseif (in_array($k, ['distinct', 'fields', 'from', 'table', 'order', 'pagesize', 'page', 'result_key'])) {
                    $isWhere = false;
                    break;
                }
            }
            if ($isWhere) {
                $options = ['where' => $options];
            } else {
                $options['where'] = [];
            }
        }
        
        return $options;
    }
527839
public function tags ($options = [])
		{
			$options[ 'data-role' ] = 'tagsinput';

			$this->adjustLabelFor($options);
			if (!isset($options[ 'id' ]))
				$options[ 'id' ] = $this->getInputId();

			$model = $this->model;
			$attribute = $this->attribute;
			$data = $model->$attribute;
			$value = '';
			if (is_array($data))
			{
				if (count($data) > 0)
				{
					if (is_object($data[ 0 ]))
						$value = implode(',', ArrayHelper::objectsAttribute($data, 'title'));
					else
						$value = implode(',', $data);
				}
			}
			else
				$value = $data;

			$this->parts[ '{input}' ] = Html::textInput(Html::getInputName($model, $attribute), $value, $options);

			return $this;
		}