prepareOptions

@return  void
431059
public function prepareOptions()
    {
        parent::prepareOptions();

        // Prepare array name
        foreach ($this->content as $key => $option) {
            $option[0]->setAttribute('name', $option[0]->getAttribute('name') . '[]');
        }
    }
907959
protected function prepareOptions()
    {
        foreach ($this->content as $name => $option) {
            // Array means it is a group
            if (is_array($option)) {
                foreach ($option as &$opt) {
                    if ($this->checkSelected($opt->getValue())) {
                        $opt['selected'] = 'selected';
                    }
                }

                $this->content[$name] = new HtmlElement('optgroup', $option, ['label' => $name]);
            } else {
                // Not array means it is an option
                if ($this->checkSelected($option->getValue())) {
                    $option['selected'] = 'selected';
                }
            }
        }
    }
1150429
public function prepareVars()
    {
        $this->populateTableWidget();
        $this->vars['table'] = $this->table;
        $this->vars['size'] = $this->size;
        $this->vars['rowSorting'] = $this->rowSorting;
    }
638575
protected function configure()
    {
        $this->setName($this->name);
        $this->setDescription($this->description);

        foreach ($this->arguments as $argument) {
            $this->getDefinition()->addArgument($argument);
        }

        foreach ($this->options as $option) {
            $this->getDefinition()->addOption($option);
        }
    }
83286
public function prepare()
        {
            $this->setCurlOption(CURLOPT_CUSTOMREQUEST, 'PUT');

            if(isset($this->options['data'])) {
                // Data
                $data = (isset($this->options['is_payload']) && $this->options['is_payload'] === true) ? json_encode($this->options['data']) : http_build_query($this->options['data']);

                $this->setCurlOption(CURLOPT_POSTFIELDS, $data);
            }
        }
238622
protected function prepare()
    {
        if (!is_array($this->data) || count($this->data) == 0) {
            $this->setData($this->read());
        }
    }
702824
protected function prepare() : void
    {
        if ($this->prepared) {
            return;
        }

        if ($this->cacheEnabled && file_exists($this->cacheFile)) {
            $this->loadFromCache();
            $this->prepared = true;
            return;
        }

        $routeCollector = new RouteCollector();
        $routeDefinitionCallback = $this->routeDefinitionCallback;
        $routeDefinitionCallback($routeCollector);

        $data = $routeCollector->generateRoutesData(
            new StdParser(),
            new DataGeneratorGroupCountBased()
        );
        $this->routes = $data['routes'];
        $this->dispatchData = $data['dispatch_data'];

        if ($this->cacheEnabled) {
            $this->saveToCache($data);
        }

        $this->prepared = true;
    }
985003
protected function initOptions()
    {
        if (!empty($this->requestParams)) {
            if (isset($this->options[CURLOPT_HTTPGET])) {
                $this->prepareGetParams();
            } else {
                $this->addOption(CURLOPT_POSTFIELDS, http_build_query($this->requestParams));
            }
        }

        if (!empty($this->headers)) {
            $this->addOption(CURLOPT_HTTPHEADER, $this->prepareHeaders());
        }

        if (!empty($this->cookieFile)) {
            $this->addOption(CURLOPT_COOKIEFILE, $this->cookieFile);
            $this->addOption(CURLOPT_COOKIEJAR, $this->cookieFile);
        }

        if (!empty($this->cookies)) {
            $this->addOption(CURLOPT_COOKIE, $this->prepareCookies());
        }

        if (!curl_setopt_array($this->ch, $this->options)) {
            throw new CurlWrapperCurlException($this->ch);
        }
    }
270097
public function prepareVars()
    {
        $this->vars['name'] = $this->getFieldName();
        $this->vars['value'] = $value = $this->getLoadValue();
        $this->vars['availableColors'] = $availableColors = $this->getAvailableColors();
        $this->vars['allowEmpty'] = $this->allowEmpty;
        $this->vars['showAlpha'] = $this->showAlpha;
        $this->vars['isCustomColor'] = !in_array($value, $availableColors);
    }
1102245
public function prepareOptions($options)
    {
        $defaultOptions = [
            'requirements' => [],
            'options' => [],
            'host' => null,
            'scheme' => null,
            'port' => null,
            'sslPort' => null,
            'extra' => [],
        ];

        return array_merge($defaultOptions, (array) $options);
    }
106026
public function setOptions($options) 
	{
		foreach ($this->options as $key => $option) {
			if (isset($options[$key])) {
				$this->options[$key] = $options[$key];
			}
		}
	}
526889
def prepare_options(opts = [])
      opts.inject('') do |string, (option, value)|
        string += case
                  when value
                    create_option(option, value)
                  when option.respond_to?(:each_pair)
                    prepare_options(option)
                  else
                    create_option(option)
                  end
      end
    end
1214442
private function processOptions()
    {
        $options = $this->getOptions();

        if(empty($options)) {
            throw new \Exception('Options must be set');
        }

        foreach($options['servers'] as $server) {

            $serverData = explode(self::DELIMITER, $server);

            if (count($serverData) != 2) {
                continue;
            }
            $this->servers[] = array(
                'host'   => $serverData[0],
                'port'   => $serverData[1],
            );
            if(!empty($server['weight'])) {
                $this->servers['weight'] = $server['weight'];
            }
        }

        if(isset($options['compression'])) {
            $this->compression = $options['compression'];
        }

        return $this;
    }
1084476
public function prepareVars()
    {
        $this->vars['field'] = $this->formField;
        $this->vars['editorLang'] = $this->getValidEditorLang();
        $this->vars['fullPage'] = $this->fullPage;
        $this->vars['stretch'] = $this->formField->stretch;
        $this->vars['size'] = $this->formField->size;
        $this->vars['readOnly'] = $this->readOnly;
        $this->vars['name'] = $this->getFieldName();
        $this->vars['value'] = $this->getLoadValue();
        $this->vars['toolbarButtons'] = $this->evalToolbarButtons();

        $this->vars['globalToolbarButtons'] = EditorSetting::getConfigured('html_toolbar_buttons');
        $this->vars['allowEmptyTags'] = EditorSetting::getConfigured('html_allow_empty_tags');
        $this->vars['allowTags'] = EditorSetting::getConfigured('html_allow_tags');
        $this->vars['noWrapTags'] = EditorSetting::getConfigured('html_no_wrap_tags');
        $this->vars['removeTags'] = EditorSetting::getConfigured('html_remove_tags');
        $this->vars['lineBreakerTags'] = EditorSetting::getConfigured('html_line_breaker_tags');

        $this->vars['imageStyles'] = EditorSetting::getConfiguredStyles('html_style_image');
        $this->vars['linkStyles'] = EditorSetting::getConfiguredStyles('html_style_link');
        $this->vars['paragraphStyles'] = EditorSetting::getConfiguredStyles('html_style_paragraph');
        $this->vars['tableStyles'] = EditorSetting::getConfiguredStyles('html_style_table');
        $this->vars['tableCellStyles'] = EditorSetting::getConfiguredStyles('html_style_table_cell');
    }
881800
protected function setDefaultOptions() : void
    {
        $type = $this->getType();
        if (! empty($this->defaultOptions[$type])) {
            $this->options = $this->defaultOptions[$type];
        }
    }
198438
protected function prepareOptions()
    {
        $options = [];
        foreach ($this->getSelectOptions() as $value => $label) {
            $value     = addslashes($value);
            $label     = addslashes($label);
            $options[] = [
                'sValue' => $value,
                'sLabel' => $label,
            ];
        }

        return $options;
    }
67994
protected function prepare()
    {
        /** @var CollectionView $collection */
        $collection = $this->getComponent('collection_view');
        $collection->setData($this->getDataProvider());
        if ($collection->getDataInjector() === null) {
            $collection->setDataInjector($this->makeDataInjector());
        }
        $this->applyOperations();
        $this->hideSubmitButtonIfNotUsed();
    }