Returns panel template to use for given collector name.

@param string $collectorName Name of corresponding collector.

@return string
970513
public function getPanelTemplate($collectorName)
    {
        if (!isset($this->data['panelTemplates'][$collectorName])) {
            return null;
        }

        return $this->data['panelTemplates'][$collectorName];
    }
690395
public function getTemplate()
    {
        if (null === $this->template) {
            $this->template = $this->getTemplatePathDefault('layout');
        }

        return $this->template;
    }
1226717
public function getCollection(string $collectionName): Collection
    {
        $collectionFile = $this->getCollectionFilePath($collectionName);
        $storage = $this->factory->storage($collectionFile, $this->type);
        return $this->factory->collection($storage);
    }
198518
public static function generate(RouteCollection $routeCollection, $routeName)
    {
        $flag = false;
        $index = 1;
        while ($flag === false) {
            if ($routeCollection->get($routeName)) {
                $routeName = $routeName.'_'.$index++;
            } else {
                $flag = true;
            }
        }

        return $routeName;
    }
167603
public function getTemplateFileContents($filename)
    {
        $templatePath = rtrim($this->config->get('templatepath', 'backend'), '\\/');
        if (empty($templatepath)) {
            $templatePath = $this->templatesPath;
        }

        return file_get_contents(
            "{$templatePath}/{$this->name}/{$filename}"
        );
    }
906057
public function getTemplate($fileName='',$useEngine = false)
	{
		ob_start();
		$file = $this->getTemplateName($fileName);
		if($useEngine)
		{
			$this->view->display($file);
		}
		else
		{
			include $file;
		}
		return ob_get_clean();
	}
1187040
protected function getTemplate()
    {
        $filter_tpl = $this->config->getTemplate();
        $grid_tpl = $this->grid->getConfig()->getTemplate();
        return str_replace('*.', "$grid_tpl.filters.", $filter_tpl);
    }
247894
protected function collectDataFromInputForTemplate(CollectionInterface $options)
    {
        $name = $options->get('name');

        if (!$name) {
            throw new InvalidArgumentException(
                'Name option must be a non empty string'
            );
        }

        if (mb_strpos($name, ':') === false && $options->get('default_namespace')) {
            $name = $options->get('default_namespace') . ':' . $name;
        }

        if (!preg_match('/^([a-zA-Z0-9_\.]{3,}):([a-zA-Z0-9_\.]{3,})$/', $name, $nameParts)) {
            throw new InvalidArgumentException(
                "Name option must be in format namespace:name, got: {$name}"
            );
        }

        $nameParts = array_map('strtolower', $nameParts);
        $namespace = implode('', array_map('ucfirst', explode('.', $nameParts[1])));
        $className = implode('', array_map('ucfirst', preg_split('/(\.|_)/', $nameParts[2])));

        $return = [
            'full_component_name' => $name,
            'php_namespace' => $namespace,
            'php_class' => $className,
            'component_namespace' => $nameParts[1],
            'component_name' => $nameParts[2],
            'readable_title' => $options->get(
                'title',
                str_replace('.', ' ', ucfirst($nameParts[2]))
            ),
        ];

        return $return;
    }
1308142
public function getTemplate(string $templateName): array
    {
        if (is_array($this->template))
            return $this->template;

        if (property_exists($this->getTemplateManager(), $templateName))
            return $this->getTemplateManager()->$templateName;

        $templateName = 'get' . ucfirst($templateName);
        if (! method_exists($this->getTemplateManager(), $templateName))
            trigger_error(sprintf('No template "%s" was found in %s Manager.', $templateName, get_class($this->getTemplateManager())), E_USER_ERROR);

        return $this->getTemplateManager()->$templateName();
    }
525704
public static function template($name)
    {
        $template = null;

        //
        // It's a template name or template contents?
        //
        if (preg_match('/^[A-Za-z0-9_\.\-\/]+\.html$/', $name)) {
            // It's a template name!
            $template = static::get(self::TYPE_TEMPLATE, $name);

            if (!$template) {
                $fallback_template_path = shared_storage_dir() . '/default/templates/' . $name;
                // try to retrieve local fallback template
                if (!file_exists($fallback_template_path)) {
                    throw new Exceptions\MethodFailureException("Template not found: '{$name}'. Please run `hook generate:template {$name}` to generate one.");
                }

                // use local template if can't find
                $template = new static(array(
                    'type' => self::TYPE_TEMPLATE,
                    'code' => file_get_contents($fallback_template_path),
                    'name' => $name
                ));
            }
        }

        if (!$template) {
            $template = new static(array(
                'type' => self::TYPE_TEMPLATE,
                'code' => $name,
                'name' => 'inline-template.html'
            ));
        }

        return $template;
    }
176544
public function getDefaultTemplate($className)
    {
        /**
         * todo replace with config object
         */
        return APPLICATION_PATH .
        strtolower(
            str_replace(array('\\'), '/',
                str_replace(
                    $this->applicationNamespace, '', str_replace(
                        'controller', 'view', $className
                    )
                )
            )
        );
    }
897845
public function getTemplatePath($templateName)
    {
        $fileName = "$templateName.php";
        foreach ($this->paths as $path) {
            $fullPath = $path . DIRECTORY_SEPARATOR . $fileName;
            if (is_file($fullPath)) {
                return $fullPath;
            }
        }
        return false;
    }
474068
protected function getScaffoldedModel($className)
    {
        if (! $fields = $this->cache->getFields())
        {
            return str_replace('{{rules}}', '', $this->template);
        }

        $rules = array_map(function($field) {
            return "'$field' => 'required'";
        }, array_keys($fields));

        return str_replace('{{rules}}', PHP_EOL."\t\t".implode(','.PHP_EOL."\t\t", $rules) . PHP_EOL."\t", $this->template);
    }
1061933
protected function getTemplateContent($filename)
    {
        $filepath = $this->getTemplateFilePath($filename);

        if (!$filepath) {
            return null;
        }

        $contents = file_get_contents($filepath);

        if (!$contents) {
            return null;
        }

        return $contents;
    }
339029
public function getTemplate($name)
    {
        $filename = $this->getResource($name);
        $template = new Eresus_Template($filename);
        return $template;
    }
550778
public function getFQCNFromTemplateName($templateName)
    {
        $classname = $this->compiledNamespace."\\".$templateName;
        $classname = str_replace('/', '\\', $classname);
        $classname .= "Jig";

        return $classname;
    }
511461
public function getNamedTemplate($name)
    {
        if ($importedTemplate = singleton(WorkflowDefinitionImporter::class)->getImportedWorkflows($name)) {
            return $importedTemplate;
        }

        if (!is_array($this->templates)) {
            return;
        }
        foreach ($this->templates as $template) {
            if ($template->getName() == $name) {
                return $template;
            }
        }
    }