@param array $options

@return array
328451
private function parseOptions(array $options): array
    {
        $child = $options['child'] ?? [];

        if (isset($options['header'])) {
            $options['extras'] = $options['extras'] ?? [];
            $options['extras'] = array_merge($options['extras'], ['header' => $options['header']]);
        }

        if (isset($options['divider'])) {
            $options['extras'] = $options['extras'] ?? [];
            $options['extras'] = array_merge($options['extras'], ['divider' => true]);
        }

        if (isset($options['icon'])) {
            $options['extras'] = $options['extras'] ?? [];
            $options['extras'] = array_merge($options['extras'], ['icon' => $options['icon']]);
        }

        if (isset($options['route']) && is_array($options['route'])) {
            $options['routeParameters'] = $options['route']['[parameters'] ?? [];
            $options['route'] = $options['route']['name'];
        }

        foreach ($this->parsers as $parser) {
            if ($result = $parser($options)) {
                $options = $result;
            }
        }

        unset($options['child']);

        return [
            'options' => $options,
            'child' => $child,
        ];
    }
231441
private function configure(array $options = []): array
    {
        $resolver = new OptionsResolver();
        $resolver->setDefaults([
            'max_restarts' => 10,
        ]);

        $resolver->setAllowedTypes('max_restarts', 'int');

        return $resolver->resolve($options);
    }
1325769
public function getTagOptions($tag, $options)
    {
        return isset($this->tagOptions[$tag]) ? $this->tagOptions[$tag] : array();
    }
294586
public function getOptions($options = array())
    {
        if ($options instanceof \Zend_Config) {
            return $options->toArray();
        } elseif (!is_array($options)) {
            throw new \Zend_Validate_Exception('$config must be an instance of Zend_Config or array.');
        }
        
        return $options;
    }
1233122
private function getRequestOptions(array $options)
    {
        $restOptions = isset($options['restOptions'])
            ? $options['restOptions']
            : $this->restOptions;
        $timeout = isset($options['requestTimeout'])
            ? $options['requestTimeout']
            : $this->requestTimeout;

        if ($timeout && !array_key_exists('timeout', $restOptions)) {
            $restOptions['timeout'] = $timeout;
        }

        return $restOptions;
    }
416932
private function resolveOptions(array $options = array())
    {
        $this->options["ga"] = $this->ga;

        if (!$this->ga->getCode() && isset($options['code'])) {
            $this->ga->setCode($options['code']);
        } else if (!$this->ga->getDomain() && isset($options['domain'])) {
            $this->ga->setDomain($options['domain']);
        }

        return array_merge($this->options, $options);
    }
1184083
protected function getStyleChoices(array $options)
    {
        $choices = array();
        if (
            isset($options['data']) &&
            $options['data'] instanceof BlockInterface
        ) {
            $siteId = $this->contextManager->getSiteId();
            $site = $this->siteRepository->findOneBySiteId($siteId);
            $templateSetId = $site->getTemplateSet();
            $templateSetParameters = $this->templateManager->getTemplateSetParameters();
            $blockComponent = $options['data']->getComponent();

            foreach ($templateSetParameters[$templateSetId]['styles'] as $key => $configuration) {
                if (
                    (isset($configuration['allowed_blocks']) && isset($configuration['label'])) &&
                    (empty($configuration['allowed_blocks']) || in_array($blockComponent, $configuration['allowed_blocks']))
                ) {
                    $choices[$key] = $configuration['label'];
                }
            }
        }

        return $choices;
    }
299307
public function prepare($options = [])
    {
        if (request()->ajax()) {
            return $this->getArray($options);
        }

        return $this->getHtml($options);
    }
612499
public function getList(array $options = array())
    {
        $uri = $this->buildListResourceUri($this->listId);
        $response = $this->makeApiRequest($uri, $options);
        return $response->list;
    }
329698
protected function normalizeOptions(array $options)
    {
        return array_merge(parent::normalizeOptions($options), [
            'inverse'   => $this->inverse,
            'fixed'     => $this->fixed,
            'static'    => $this->static,
            'brand'     => $this->brand,
            'useForm'   => $this->useForm,
            'rightMenu' => $this->rightMenu,
            ], $options);
    }
953926
private function generateQueryOptions(array $options = [])
    {
        if (isset($options['query'])) {
            $result = $options['query'] + $this->getDefaultOptions();
        } else {
            $result['query'] = $options + $this->getDefaultOptions();
        }

        return $result;
    }
301549
private function resolveOptions(array $options = [])
    {
        $resolver = new OptionsResolver();
        $this->configure($resolver);

        return $resolver->resolve($options);
    }
491976
private function getRouteArguments(array $options = [])
    {
        $routeArguments = [];
        foreach ($options as $key => $value) {
            if (array_key_exists($key, $this->options)) {
                $this->options[$key] = $value;
                continue;
            }
            $routeArguments[$key] = $value;
        }
        return $routeArguments;
    }
852758
protected function processOptions(array $options)
    {
        $resolver = new OptionsResolver();
        $this->setDefaultOptions($resolver);

        return $resolver->resolve($options);
    }
1071404
public function options(array $options = null)
    {
        if (null === $options) {
            return $this->options;
        }

        $this->options = [];
        foreach($options as $option)
            $this->options[$option] = false;

        return $this;
    }
28728
public function hasOptions(array $options) {
        $all = true;

        foreach ($options as $option) {
            if (!isset($this->_options[$option])) {
                $all = false;
            }
        }

        return $all;
    }
333198
protected function resolveOptions(array $options = array())
    {
        $resolver = new OptionsResolver;
        $this->setDefaultOptions($resolver);

        if (!empty($this->options)) {
            $resolver->setDefaults($this->options);
        }

        return $resolver->resolve($options);
    }