Transforms Crud plugin flashs into Flash messages.

@param array $options

@return array
344016
protected function _transformCrudOptions(array $options) {
		if (isset($options['params']['class']) && !isset($options['type'])) {
			$class = $options['params']['class'];
			$pos = strrpos($class, ' ');
			if ($pos !== false) {
				$class = substr($class, $pos + 1);
			}
			$options['type'] = $class;
			$options['element'] = $class;
			unset($options['params']['class']);
			unset($options['params']['original']);
		}

		return $options;
	}
1371821
protected function parseOptions(array $options): array
    {
        $this->setTransformer($this);

        $options = parent::parseOptions($options);

        // Set some default CSS classes if chosen theme is "bootstrap".
        if (isset($options['theme']) && 'bootstrap' === $options['theme']) {
            $options['attributes']['class'] = isset($options['attributes']['class']) ?
                ' btn btn-primary' : 'btn btn-primary';
        }

        return $options;
    }
1317742
protected function decodeMessage($binary, array $options = [])
    {
        $resolver = new OptionsResolver();
        $this->encoder->setDefaultOptions($resolver);
        $options = $resolver->resolve($options);

        return $this->encoder->decode($binary, $this->compressor, $options);
    }
753098
protected function buildMessages(array $flashes, $type)
    {
        $messages = '';
        foreach ($flashes as $msg) {
            $messages .= $this->template->wrapMessage($msg);
        }

        return $this->template->wrapMessages($messages, $type);
    }
23630
protected function parseOptions(array $options): array
    {
        $this->setTransformer(new StringToBooleanTransformer());

        $options = parent::parseOptions($options);

        // Set some default CSS classes if chosen theme is "bootstrap".
        if (isset($options['theme']) && 'bootstrap' === $options['theme']) {
            $options['attributes']['class'] = isset($options['attributes']['class']) ?
                'form-check-input '.$options['attributes']['class'] : 'form-check-input';
            $options['label_attr']['class'] = isset($options['label_attr']['class']) ?
                'form-check-label '.$options['label_attr']['class'] : 'form-check-label';
        }

        return $options;
    }
656022
public function checkMessages(array $options = [])
    {
        $this->buildCall('/incoming-messages');
        $this->buildBody($options);

        $rawMessages = $this->getRequest()->json();

        return $this->makeMessages($rawMessages['Response']['Entries']);
    }
515175
protected function parseOptions(array $options): array
    {
        $this->setTransformer(new NumberToLocalizedStringTransformer($this->getLocale(), $this));

        return parent::parseOptions($options);
    }
481025
private function configure(array $options = []): array
    {
        $defaults = [
            'max_restarts' => 10,
        ];

        $config = array_merge($defaults, $options);

        // Make sure no invalid values are provided
        if (count($config) !== count($defaults)) {
            throw new LogicException(sprintf('Valid options to the PluginProviders are: %s', implode(', ', array_values($defaults))));
        }

        return $config;
    }
138170
public function update(array $options = array())
    {
        $module = $this->utils()->whichModule($this);
        return $this->utils()->update($module, $options);
    }
726181
protected function makeFromArrayOfConditions( $options ) {
		$conditions = array_map( function ( $condition ) {
			if ( $condition instanceof ConditionInterface ) {
				return $condition;
			}
			return $this->make( $condition );
		}, $options );

		return new MultipleCondition( $conditions );
	}
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);
    }
980395
public function actionTranslation($options)
    {
        if (!is_array($options)) {
            return $this->translator->trans($options, [], 'CmsKernelAdminBridge');
        }

        $resultOptions = [];
        foreach ($options as $optionKey => $option) {
            $option = null === json_decode($option, true) ? $option : json_decode($option, true);

            if (is_array($option)) {
                foreach ($option as $iterationKey => $iteration) {
                    if (is_array($iteration)) {
                        foreach ($iteration as $iKey => $i) {
                            if (is_array($i)) {
                                foreach ($i as $iiKey => $ii) {
                                    $resultOptions[$optionKey][$iterationKey][$iKey][$iiKey] = $this->translator->trans($ii, [], 'CmsKernelAdminBridge');
                                }
                            } else {
                                $resultOptions[$optionKey][$iterationKey][$iKey] = $this->translator->trans($i, [], 'CmsKernelAdminBridge');
                            }
                        }
                    } else {
                        $resultOptions[$optionKey][$iterationKey] = $this->translator->trans($iteration, [], 'CmsKernelAdminBridge');
                    }
                }
            } else {
                $resultOptions[$optionKey] = $this->translator->trans($option, [], 'CmsKernelAdminBridge');
            }
        }

        return $resultOptions;
    }
101738
protected function options(array $options = null)
    {
        $dataOptions = $this->options;

        if ($options)
        {
            $dataOptions = $this->merge($dataOptions, $options);
        }

        return $dataOptions;
    }
206161
public function generate(array $options = [])
    {
        $defaults = [
            'pattern'   => null,
            'extension' => null,
            'index'     => null
        ];
        $options = array_merge($defaults, $options);

        $ext = (string)$options['extension'];
        $pattern = self::normalizePattern($options['pattern']);
        $index = (int)$options['index'];

        $nameComponents = [];
        if ($pattern) {
            $nameComponents[] = $pattern;
        }
        if ($index || (! $pattern)) {
            $nameComponents[] = $index;
        }
        return implode('_', $nameComponents) . ($ext ? '.' . $ext : '');
    }
643052
protected function getConvertOptions(array $options)
    {
        if ($this->arrHas($options, 'convertOptions')) {
            return $this->arrGet($options, 'convertOptions', []);
        }

        return $this->arrGet($options, 'convert_options', []);
    }
569629
protected function prepareOptions(Options $options)
    {
        if ($options->getConvertImagesToBase64() === true) {

            $preparedHeaderContent = $this->convertImagesToBase64($options->getHeaderContent());
            $preparedFooterContent = $this->convertImagesToBase64($options->getFooterContent());

            $options->setHeaderContent($preparedHeaderContent);
            $options->setFooterContent($preparedFooterContent);
        }

        $options = $this->prepareHeaderAndFooter($options);

        return $options;
    }
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;
    }