Tries to guess block template name.
@return string
161192
private function guessTemplateName()
	{
		if ($this->package === null) {
			throw new \RuntimeException(sprintf(
				'Block package is unknown, thus it is impossible to guess template name for block [%s].',
				$this->getTitle()
			));
		}

		$name = (new \ReflectionClass($this))->getShortName();

		if (($pos = strpos($name, 'Config')) !== false
			&& $pos === (strlen($name) - 6)) {

			$name = substr($name, 0, -6);
		}

		return $this->package->getName() . ':blocks' . DIRECTORY_SEPARATOR . Inflector::tableize($name) . '.html.twig';
	}
259264
public function getBlockComponentName($blockComponent)
    {
        $name = $blockComponent;

        if (
            isset($this->blockConfiguration[$blockComponent]) &&
            isset($this->blockConfiguration[$blockComponent]['name'])
        ) {
            $name = $this->blockConfiguration[$blockComponent]['name'];
        }

        return $this->translator->trans($name);
    }
215296
function &viewTemplateName()
    {
        $name = 'ezxmltext';
        $contentobjectAttribute = false;
        $suffix = $this->viewTemplateSuffix( $contentobjectAttribute );
        if ( $suffix !== false )
        {
            $name .= '_' . $suffix;
        }
        return $name;
    }
1274175
public function getTemplateBlocks($templateFileName)
    {
        $templateBlocksWithContent = [];

        $config = \OxidEsales\Eshop\Core\Registry::getConfig();

        $tplDir = trim($config->getConfigParam('_sTemplateDir'), '/\\');
        $templateFileName = str_replace(['\\', '//'], '/', $templateFileName);
        if (preg_match('@/' . preg_quote($tplDir, '@') . '/(.*)$@', $templateFileName, $m)) {
            $templateFileName = $m[1];
        }

        if ($this->isShopTemplateBlockOverriddenByActiveModule()) {
            $shopId = $config->getShopId();

            $ids = $this->_getActiveModuleInfo();

            $activeModulesId = array_keys($ids);
            $activeThemeIds = oxNew(\OxidEsales\Eshop\Core\Theme::class)->getActiveThemesList();

            $templateBlockRepository = oxNew(ModuleTemplateBlockRepository::class);
            $activeBlockTemplates = $templateBlockRepository->getBlocks($templateFileName, $activeModulesId, $shopId, $activeThemeIds);

            if ($activeBlockTemplates) {
                $activeBlockTemplatesByTheme = $this->filterTemplateBlocks($activeBlockTemplates);

                $templateBlocksWithContent = $this->fillTemplateBlockWithContent($activeBlockTemplatesByTheme);
            }
        }

        return $templateBlocksWithContent;
    }
194217
protected function getTemplateName(): string
    {
        $configuration = GeneralUtility::makeInstance(ConfigurationService::class);
        $templateName = \trim((string)$configuration->get('htaccessTemplateName'));
        if ('' === $templateName) {
            return 'EXT:staticfilecache/Resources/Private/Templates/Htaccess.html';
        }

        return $templateName;
    }
1359706
public function getBlockPath()
    {
        if ($this->getPackageID() > 0) {
            $pkgHandle = $this->getPackageHandle();
            $dirp = (is_dir(DIR_PACKAGES . '/' . $pkgHandle)) ? DIR_PACKAGES : DIR_PACKAGES_CORE;
            $dir = $dirp . '/' . $pkgHandle . '/' . DIRNAME_BLOCKS . '/' . $this->getBlockTypeHandle();
        } else {
            if (is_dir(DIR_FILES_BLOCK_TYPES . '/' . $this->getBlockTypeHandle())) {
                $dir = DIR_FILES_BLOCK_TYPES . '/' . $this->getBlockTypeHandle();
            } else {
                $dir = DIR_FILES_BLOCK_TYPES_CORE . '/' . $this->getBlockTypeHandle();
            }
        }

        return $dir;
    }
1187040
protected function getTemplate()
    {
        $filter_tpl = $this->config->getTemplate();
        $grid_tpl = $this->grid->getConfig()->getTemplate();
        return str_replace('*.', "$grid_tpl.filters.", $filter_tpl);
    }
442182
public function forTemplate()
    {
        if ($this->BlockArea) {
            $template = [$this->class.'_'.$this->BlockArea];

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

        return $this->renderWith($this->ClassName, $this->getController());
    }
656056
public function getName() {
		if ($this->_name === null) {
			$name = get_class($this);
			$pos = strrpos($name, '\\');
			if ($pos !== false) {
				$name = substr($name, $pos + 1);
			}
			if (preg_match('/^Twig([A-Za-z]+)Extension$/', $name, $matches)) {
				$name = $matches[1];
			}
			$this->_name = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $name));
		}
		return $this->_name;
	}
609468
public function callBlock(string $block = '', ...$params): ?string
    {
        /** @var ModuleBlockInterface|null $module */
        $module = $this->module_service
            ->findByComponent(ModuleBlockInterface::class, $this->tree, Auth::user())
            ->first(static function (ModuleInterface $module) use ($block): bool {
                return $module->name() === $block && $module->name() !== 'html';
            });

        if ($module === null) {
            return '';
        }

        // Build the config array
        $cfg = [];
        foreach ($params as $config) {
            $bits = explode('=', $config);

            if (count($bits) < 2) {
                continue;
            }

            $v       = array_shift($bits);
            $cfg[$v] = implode('=', $bits);
        }

        return $module->getBlock($this->tree, 0, '', $cfg);
    }
939033
public function getToolbarTemplate()
    {
        if (null === $this->templateToolbar) {
            $this->templateToolbar = $this->getTemplatePathDefault('toolbar');
        }

        return $this->templateToolbar;
    }
1217461
public function templateName()
    {
        $key = substr(strrchr('\\'.get_class($this), '\\'), 1);

        if (!isset(static::$templateNameCache[$key])) {
            $value = $key;

            if (!ctype_lower($value)) {
                $value = preg_replace('/\s+/u', '', $value);
                $value = mb_strtolower(preg_replace('/(.)(?=[A-Z])/u', '$1-', $value), 'UTF-8');
            }

            $value = str_replace(
                [ 'abstract', 'trait', 'interface', 'template', '\\' ],
                '',
                $value
            );

            static::$templateNameCache[$key] = trim($value, '-');
        }

        return static::$templateNameCache[$key];
    }
1222493
private function namespaceBlock() {
    $node = new StatementBlockNode();
    $this->matchHidden($node);
    while ($this->currentType !== NULL) {
      if ($this->currentType === T_NAMESPACE && !$this->isLookAhead(T_NS_SEPARATOR)) {
        break;
      }
      $node->addChild($this->topStatement());
      $this->matchHidden($node);
    }
    $this->matchHidden($node);
    return $node;
  }
948970
public function guessCommandName()
    {
        $prefix = $this->makePrefix();
        if ($prefix) {
            $prefix = sprintf('%s:', $prefix);
        }
        return sprintf('%s%s', $prefix, $this->makeName());
    }
439658
public function getParentTemplateFilename() {

		if(empty($this->parentTemplateFilename)) {
		
			if(preg_match($this->extendRex, $this->bufferInstance->__rawContents, $matches)) {

				$this->parentTemplateFilename = $matches[1];

			}
		}

		return $this->parentTemplateFilename;
		
	}
1122849
protected function getTemplatePath()
    {
        if (!isset($this->templatePath)) {
            $this->templatePath = self::$config->templates[$this->template] . '/' . $this->name;
        }

        return $this->templatePath;
    }
1333266
protected function magic_get_blocks() {
        global $CFG;
        if (is_null($this->_blocks)) {
            if (!empty($CFG->blockmanagerclass)) {
                if (!empty($CFG->blockmanagerclassfile)) {
                    require_once($CFG->blockmanagerclassfile);
                }
                $classname = $CFG->blockmanagerclass;
            } else {
                $classname = 'block_manager';
            }
            $this->_blocks = new $classname($this);
        }
        return $this->_blocks;
    }