/*!
\return the template name for this input handler, includes the edit suffix if any.
484708
function editTemplateName()
    {
        $name = 'ezxmltext';
        $suffix = $this->editTemplateSuffix( $this->ContentObjectAttribute );
        if ( $suffix !== false )
        {
            $name .= '_' . $suffix;
        }
        return $name;
    }
99566
public function jsRender()
    {
        $namelessCount = 0;

        $res = preg_replace_callback(
            '/\[[a-z0-9_]*\]|{[a-z0-9_]*}/',
            function ($matches) use (&$namelessCount) {
                $identifier = substr($matches[0], 1, -1);

                // Allow template to contain []
                if ($identifier === '') {
                    $identifier = $namelessCount++;
                }

                if (!isset($this->args[$identifier])) {
                    throw new Exception([
                        'Tag not defined in template for jsExpression',
                        'tag'      => $identifier,
                        'template' => $this->template,
                    ]);
                }

                $value = $this->args[$identifier];

                // No escaping for {}
                if ($matches[0][0] === '{') {
                    return $value;
                }

                if (is_object($value) && $value instanceof jsExpressionable) {
                    $value = '('.$value->jsRender().')';
                } elseif (is_object($value)) {
                    $value = $this->_json_encode($value->toString());
                } else {
                    $value = $this->_json_encode($value);
                }

                return $value;
            },
            $this->template
        );

        return trim($res);
    }
73249
public function get_formatted_name() : string {
        $context = $this->get_handler()->get_configuration_context();
        return format_string($this->get('name'), true, ['context' => $context]);
    }
1349307
public function forTemplate()
    {
        $template = $this->getClassName();

        if (\SSViewer::hasTemplate($template)) {
            return $this->renderWith($template);
        }

        return _t('ContentElement.missingTemplate', 'Missing Template for {template}', [
            'template' => $template
        ]);
    }
260323
protected function inputName()
    {
        switch (true) {
            case isset($_GET['p']):
                return $_GET['p'];
            case isset($_SERVER['PATH_INFO']):
                return $_SERVER['PATH_INFO'];
            case isset($_SERVER['DOCUMENT_URI']):
                return substr($_SERVER['DOCUMENT_URI'], strlen($_SERVER['SCRIPT_NAME']));
        }
    }
1257446
public function getTemplate() : ?string 
    {
        if ( ! $this->hasTemplate()) {
            $this->setTemplate($this->getDefaultTemplate());
        }
        return $this->template;
    }
413613
private function getRenderFieldBlockName($fieldTypeIdentifier, $type)
    {
        $suffix = $type === self::EDIT ? self::FIELD_EDIT_SUFFIX : self::FIELD_VIEW_SUFFIX;

        return $fieldTypeIdentifier . $suffix;
    }
219128
public function getFilename($extension = '.php')
    {
        // If template is named,
        // return joined template names.
        if ($this->isNamed()) {
            return join('-', $this->file) . $extension;
        }

        // Use first template name, if template
        // file is an array, but is not named.
        if (is_array($this->file) && isset($this->file[0])) {
            return "{$this->file[0]}{$extension}";
        }

        return apply_filters('tonik/gin/template/filename', "{$this->file}{$extension}");
    }
534982
function render_edit($item)
    {
        if ($item['name'] === '')
        {
            Eresus_Kernel::app()->getPage()->addErrorMessage(
                sprintf(errFormFieldHasNoName, $item['type'], $this->form['name']));
        }
        $result = "\t\t".'<tr><td class="formLabel">'.$item['label'].'</td><td><input type="text" name="'.$item['name'].'" value="'.EncodeHTML($item['value']).'"'.(empty($item['maxlength'])?'':' maxlength="'.$item['maxlength'].'"').$this->attrs($item).' />'.$item['comment']."</td></tr>\n";
        return $result;
    }
805858
protected function getTemplateName() {
				$templateName = $this->templateName;
				
				if($templatePrefix = $this->templatePrefix())
						$templateName = $this->joinPrefix($templateName, $templatePrefix);
				
				if($templateSuffix = $this->templateSuffix())
						$templateName = $this->joinSuffix($templateName, $templateSuffix);
				
				return $templateName;
		}
1235966
protected function getNameInput()
    {
        $name   = Str::studly($this->argument('name'));
        $suffix = $this->getNameSuffix();

        if ($suffix && !Str::endsWith($name, $suffix)) {
            $name .= $suffix;
        }

        return $name;
    }
15361
protected function _getTplName()
    {
        // assign template name
        $sTplName = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('tpl');

        if ($sTplName) {
            // security fix so that you cant access files from outside template dir
            $sTplName = basename($sTplName);

            //checking if it is template name, not content id
            if (!getStr()->preg_match("/\.tpl$/", $sTplName)) {
                $sTplName = null;
            } else {
                $sTplName = 'message/' . $sTplName;
            }
        }

        return $sTplName;
    }
384937
public function getBlockPrefix()
    {
        $rc = new \ReflectionClass($this);

        // Non-greedy ("+?") to match "type" suffix, if present
        $fqcn = preg_replace(
            array('/([^\\\\])(Bundle)?\\\\Form\\\\Type(\\\\[^\\\\]+?)(Type)?$/i', '/\\\\/'),
            array('\\1\\3', '_'),
            $rc->getName()
        );

        return strtolower($fqcn);
    }
987282
private function parseEventName()
    {
        $name = basename(strtr(get_class($this->event), ['\\' => '/']));

        return strtolower(preg_replace('#[A-Z]#', '.$0', lcfirst($name)));
    }
785050
protected function getInputNamePrefix()
    {
        $model = $this->context->model;
        if ($model instanceof Model) {
            if (empty($this->renderer->columns) || ($this->isRendererHasOneColumn() && $this->hasModelAttribute($this->name))) {
                return $model->formName();
            }
            
            return Html::getInputName($this->context->model, $this->context->attribute);
        }
        
        return $this->context->name;
    }
850865
protected function getTemplateRegexPattern()
    {
        $parts = explode('@', $this->template);
        if (count($parts) === 2) {
            $parts[0]    = str_replace('*', self::$nameRegex, $parts[0]);
            $topTLDIndex = strrpos($parts[1], '.');


            if ($topTLDIndex !== FALSE) {
                $secondTLD = substr($parts[1], 0, $topTLDIndex);
                $secondTLD = str_replace('*', self::$domainSecondTLDRegex, $secondTLD);

                $topTLD   = substr($parts[1], $topTLDIndex);
                $topTLD   = str_replace('*', self::$domainTLDRegex, $topTLD);
                $template = $parts[0] . '@' . $secondTLD . $topTLD;
            } else {
                $template = $parts[0] . '@' . $parts[1];
            }
        } else {
            $template = '';
        }

        //$template = str_replace(['.', '+', '-'], ['\.', '\+', '\-'], $template);

        return sprintf('/^%s$/', $template);
    }
135576
private function getStdSeparatedName()
    {
        if ($this->schema && $this->getBuildProperty('schemaAutoPrefix')) {
            return $this->schema . NameGenerator::STD_SEPARATOR_CHAR . $this->nonPrefixedName;
        } else {
            return $this->nonPrefixedName;
        }
    }