protected function createInput($currentLocale = null)
    {
        // Create element using arguments.
        $element = call_user_func_array([$this->form, $this->element()], array_values($this->arguments()));

        // Elements such as 'bind' do not return renderable stuff and do not accept methods.
        if ($element) {
            // Apply requested methods.
            foreach ($this->methods() as $method) {
                $methodName = $method['name'];
                $methodParameters = $method['parameters'];

                // Check if method is locale-specific.
                if (ends_with($methodName, 'ForLocale')) {
                    $methodName = strstr($methodName, 'ForLocale', true);
                    $locales = array_shift($methodParameters);
                    $locales = is_array($locales) ? $locales : [$locales];
                    if (!is_null($currentLocale) && !in_array($currentLocale, $locales)) {
                        // Method should not be applied for this locale.
                        continue;
                    }
                }

                // Call method.
                if (!empty($methodParameters)) {
                    call_user_func_array([$element, $methodName], $this->replacePlaceholdersRecursively($methodParameters, $currentLocale));
                } else {
                    $element->{$methodName}();
                }
            }
        }

        return $element;
    }