Render the option tags.

@param array $options the options for the form.
@return string rendered tags.
186312
protected function renderOptionTags($options)
    {
        $output = '';
        if ($this->hasArgument('prependOptionLabel')) {
            $value = $this->hasArgument('prependOptionValue') ? $this->arguments['prependOptionValue'] : '';
            if ($this->hasArgument('translate')) {
                $label = $this->getTranslatedLabel($value, $this->arguments['prependOptionLabel']);
            } else {
                $label = $this->arguments['prependOptionLabel'];
            }
            $output .= $this->renderOptionTag($value, $label) . chr(10);
        }
        $output .= $this->renderOptionTagsInternal($options);

        return $output;
    }
1057450
public function renderCloseButton($options = [])
    {
        if (!isset($options['id'])) {
            $options['id'] = $this->getId() . '-close-button';
        }

        $this->getView()->registerJs('
        jQuery("#' . $options['id'] . '").on("click", function(event) {
            jQuery("#' . $this->getId() . '").fadeOut();
        });
        ');

        return Elements::icon('close', $options);
    }
661284
public function renderInput(array $options = [])
    {
        $attrs = $this->prepareAttributes();

        if ($this->form && $this->form->getRenderer()) {
            return $this->form->getRenderer()->renderInput($this, $attrs, $options);
        }

        return $this->buildInput($attrs);
    }
24042
public function render(array $options = array(), $provider = null)
    {
        if (isset($provider)) {
            $options['provider'] = $provider;
        }

        $request = $this->getCurrentRequest();
        if (!isset($request)) {
            throw new RuntimeException('Comments rendering needs the Request.');
        }

        return $this->commentsRenderer->render($request, $options);
    }
727638
public function render($options = array())
    {
        $options = array_merge($this->defaultOptions, $options);
        if ($options['size'] === 'small')
            $options['height'] = 15;
        elseif ($options['size'] === 'large')
            $options['height'] = 24;
        else
            $options['height'] = '';

        return $this->view->make('shareable::google_plus', array('options' => $options));
    }
420532
public static function renderOption($value, $label, $selected, $options = [])
    {
        if ($value === true) {
            // Handle the special case of a true value
            $value = "true";
        }
        $options = array_merge($options, ["value" => $value]);
        if ($selected) {
            $options['selected'] = true;
        }

        return sprintf("<option %s>%s</option>", html_params($options), $label);
    }
212882
public function renderFields($fieldset = null, $group = null, array $options = [])
    {
        $output = '';

        foreach ($this->getFields($fieldset, $group) as $field) {
            $output .= "\n" . $field->render($options);
        }

        return $output;
    }
440881
public function outputOptions(array $options)
    {
        /* @var $output \PG\MSF\Base\Output */
        $output = $this->getContext()->getOutput();
        $status = 200;
        if ($this->verb !== 'OPTIONS') {
            $status = 405;
        }
        $output->setHeader('Allow', implode(', ', $options));
        if (!empty($output->response)) {
            $output->setContentType('application/json; charset=UTF-8');
            $output->end('', $status);
        }
    }
1043367
public function render(array $options, $name, $selected = array(), array $attrs = array(), $tpl = false)
    {
        if (is_array($selected)) {
            $last = Arr::last($selected);
            $selectedVal = Arr::in($last, $selected) ? $last : null;
            list($options, $selected) = $this->_checkSelected($options, $selectedVal);
        }

        if (is_string($selected)) {
            list($options, $selected) = $this->_checkSelected($options, $selected);
        }

        return parent::render($options, $name, $selected, $attrs, $tpl);
    }
678489
public function render(Request $request, array $options = array())
    {
        return $this->doRender(
            $options + array(
                'app_id' => $this->appId,
                'width' => $this->defaultWidth,
                'num_posts' => $this->defaultNumPosts,
                'color_scheme' => $this->defaultColorScheme,
                'include_sdk' => $this->defaultIncludeSDK,
                'url' => $request->getSchemeAndHttpHost() . $request->attributes->get('semanticPathinfo', $request->getPathInfo()),
            )
        );
    }
10973
public function html(array $options = array(), array $ns = array()) {
        if ($ns) {
            foreach ($ns as $key => $url) {
                $this->ns($key, $url);
            }
        }

        return $this->Html->tag('html', null, $this->_namespaces + $options);
    }
1205499
public function openFormActions($options = array())
    {
        $options = $this->appendClassToOptions('form-actions', $options);

        return '<div' . $this->html->attributes($options) . '>';
    }
702680
public function render($menu, $tag = 'ul', $options){
        return $this->renderMenu(
            $this->menuCollection[$menu],
            $tag,
            $options,
            $this->menuCollection[$menu]->getActiveMenu(),
            0
        );
    }
694293
public function setOptions(array $options)
    {
        if (isset($options['rendererClassName'])) {
            $this->setRendererClassName($options['rendererClassName']);
        }
        if (isset($options['renderingOptions'])) {
            foreach ($options['renderingOptions'] as $key => $value) {
                $this->setRenderingOption($key, $value);
            }
        }
        if (isset($options['finishers'])) {
            foreach ($options['finishers'] as $finisherConfiguration) {
                $this->createFinisher($finisherConfiguration['identifier'], isset($finisherConfiguration['options']) ? $finisherConfiguration['options'] : []);
            }
        }

        FormArrays::assertAllArrayKeysAreValid($options, array('rendererClassName', 'renderingOptions', 'finishers'));
    }
508664
public function setOptions(array $options) {
    foreach ($options as $key => $value) {
      if (is_int($key)) {
        $option  = '--' . $value;
      }
      elseif (strlen($key) == 1) {
        $option = '-' . $key;
        if (!empty($value)) {
          $option .= ' ' . escapeshellarg($value);
        }
      }
      else {
        // Do not render --uri=default.
        if ($key == 'uri' && $value == 'default') {
          continue;
        }
        $option = '--' . $key;
        if (!empty($value)) {
          $option .= '=' . escapeshellarg($value);
        }
      }
      if (!in_array($option, $this->options)) {
        $this->options[] = $option;
      }
    }
    return $this;
  }
957274
public static function render($options) {
        $jsExpressions = array();
        //Replace any js expression with random strings so we can switch
        //them back after json_encode the options
        $optionsJsExpr = static::replaceJsExpr($options, $jsExpressions);
        //TODO: Check for encoding errors
        $result = json_encode($optionsJsExpr);
        //Replace any js expression on the json_encoded string
        foreach ($jsExpressions as $key => $expr) {
            $result = str_replace('"' . $key . '"', $expr, $result);
        }
        return $result;
    }
844843
public function render(array $options = array())
    {
        $url = $this->service->generateEmbedUrl($this);
        $options = array_replace(array(
            'width' => 560,
            'height' => 315,
            'frameborder' => 0,
            'allowfullscreen' => ''
        ), $options);

        $html = <<<HTML
<iframe src="$url" width="{$options['width']}" height="{$options['height']}" frameborder="{$options['frameborder']}" {$options['allowfullscreen']}></iframe>
HTML;
        return $html;
    }