Get stub templates.

@return string
506684
public function getStub()
    {
        $parser = $this->getNameParser();

        if ($parser->isCreate()) {
            return Stub::create('/migration/create.stub', [
                'class' => $this->getClass(),
                'table' => $parser->getTable(),
                'fields' => $this->getSchemaParser()->render(),
            ]);
        } elseif ($parser->isAdd()) {
            return Stub::create('/migration/add.stub', [
                'class' => $this->getClass(),
                'table' => $parser->getTable(),
                'fields_up' => $this->getSchemaParser()->up(),
                'fields_down' => $this->getSchemaParser()->down(),
            ]);
        } elseif ($parser->isDelete()) {
            return Stub::create('/migration/delete.stub', [
                'class' => $this->getClass(),
                'table' => $parser->getTable(),
                'fields_down' => $this->getSchemaParser()->up(),
                'fields_up' => $this->getSchemaParser()->down(),
            ]);
        } elseif ($parser->isDrop()) {
            return Stub::create('/migration/drop.stub', [
                'class' => $this->getClass(),
                'table' => $parser->getTable(),
                'fields' => $this->getSchemaParser()->render(),
            ]);
        }

        return parent::getStub();
    }
763760
public function getTemplate()
    {
        if ($this->expectedMessage) {
            return $this->getMessageTemplate();
        }

        if (!isset($this->template)) {
            return $this->getDefaultTemplate();
        }

        return $this->template;
    }
896379
public function getTemplates()
    {
        $templates = SSViewer::get_templates_by_class($this, '', __CLASS__);
        // Prefer any custom template
        if ($this->getTemplate()) {
            array_unshift($templates, $this->getTemplate());
        }
        return $templates;
    }
254653
public function getRenderTemplates()
    {
        $class = $this->Classname;

        $templates = array();
        if (is_object($class)) $class = get_class($class);

        if (!is_subclass_of($class, 'DataObject')) {
            throw new InvalidArgumentException("$class is not a subclass of DataObject");
        }

        while ($next = get_parent_class($class)) {
            if ($this->style) {
                $templates[] = $class . '_' . $this->style;
            }
            $templates[] = $class;
            if ($next == 'DataObject') {
                return $templates;
            }

            $class = $next;
        }
    }
888405
private function getPharSections()
    {
        $stub = array(
            'if (class_exists(\'Phar\')) {',
            $this->getAlias(),
        );

        if ($this->intercept) {
            $stub[] = "Phar::interceptFileFuncs();";
        }

        if ($this->mung) {
            $stub[] = 'Phar::mungServer(' . var_export($this->mung, true) . ");";
        }

        if ($this->index && !$this->web && !$this->extractForce) {
            $stub[] = "require 'phar://' . __FILE__ . '/{$this->index}';";
        }

        $stub[] = '}';

        return $stub;
    }
675086
public function component_templates() {
		$output = null;
		foreach ( $this->modals as $modal ) {

			$width  = 'data-width="950"';
			$height = 'data-height="550"';

			$output .= '<script type="text/html" ' . $width . ' ' . $height . ' id="' . esc_attr( $this->id() ) . '-' . esc_attr( $modal->slug ) . '">';
			if ( isset( $modal->struct['preview'] ) ) {
				$template = uix()->add( 'control', $modal->slug, array(
					'type'     => 'template',
					'template' => $modal->struct['preview'],
				) );

				$output .= $template->render();
			} else {
				$output .= '<div>' . $modal->struct['label'] . '</div>';
			}
			$output .= '</script>';

		}

		return $output;
	}
591961
public function getPage($stub)
    {
        $this->logger->addNotice(print_r($this->cfg->getAll(), 1));

        $stmtManager = $this->getStatementManager(Simple::class);

        /** @var Select $stmtBuilder */
        $stmtBuilder = $stmtManager->getStatementBuilder(Select::class);

        /** @var PageCollection $collection */
        $collection = $stmtManager->setStatement($stmtBuilder->setWhere(['stub = :stub']))
            ->setArguments(['stub' => $stub])
            ->execute();

        /** @var PageDataModel $c */
        $c = $collection->current();

        return $c;
    }
1224219
protected function getReplacement($stub)
    {
        $replacements = $this->module->config('stubs.replacements');

        if (!isset($replacements[$stub])) {
            return [];
        }

        $keys = $replacements[$stub];

        $replaces = [];

        foreach ($keys as $key) {
            if (method_exists($this, $method = 'get' . ucfirst(Str::studly(strtolower($key))) . 'Replacement')) {
                $replaces[$key] = $this->$method();
            } else {
                $replaces[$key] = null;
            }
        }

        return $replaces;
    }
412866
protected function getTemplateRegexPattern()
    {
        $template = str_replace('.', '\.', $this->template);
        $template = str_replace('*', '[a-zA-Z0-9]*', $template);

        return sprintf('/^%s$/', $template);
    }
1035922
protected function getStub()
    {
        if ($this->option('render') && $this->option('report')) {
            $stub = config('stubs.path') . '/exception-render-report.stub';
        } elseif ($this->option('render')) {
            $stub = config('stubs.path') . '/exception-render.stub';
        } elseif ($this->option('report')) {
            $stub = config('stubs.path') . '/exception-report.stub';
        } else {
            $stub = config('stubs.path') . '/exception.stub';
        }

        return file_exists($stub) ? $stub : parent::getStub();
    }
336174
public function getTemplate()
    {
        if ($this->templateEngine == false) {
            return false;
        }
        
        $this->view->setTwigEnvironment();

        return $this->view->getTemplate();
    }
493508
protected function compileLocalizationStub()
    {
        $stub = $this->files->get(substr(__DIR__,0, -5) . 'Stubs/localization.stub');

        $this->build($stub);

        return $stub;
    }
875100
private function loadTemplate()
    {
        return [
            0 => $this->template[0] != '' ? file_get_contents($this->template[0]) : '',
            1 => $this->template[1] != '' ? file_get_contents($this->template[1]) : '',
            2 => $this->template[2] != '' ? file_get_contents($this->template[2]) : '',
        ];
    }
10077
public function getTemplates()
    {
        $templates = array();

        if ($handle = opendir(Primer::$PATTERN_PATH . '/templates')) {
            while (false !== ($entry = readdir($handle))) {
                if (substr($entry, 0, 1) !== '.') {
                    $templates[] = array(
                        'id' => $entry,
                        'title' => preg_replace('/[^A-Za-z0-9]/', ' ', $entry),
                    );
                }
            }

            closedir($handle);
        }

        return $templates;
    }
100656
public function getArrguments()
    {
        return [
            'model-name' => $this->modelName,
            '--resource-file' => $this->resourceFile,
            '--views-directory' => $this->viewsDirectory,
            '--routes-prefix' => $this->prefix,
            '--language-filename' => $this->languageFileName,
            '--layout-name' => $this->layout,
            '--template-name' => $this->template,
            '--force' => $this->force,
        ];
    }
389194
public function buildTemplate()
    {
        if (!empty($this->template)) {
            return $this->template;
        }

        $actions = [];
        foreach ($this->actionBuilders as $actionBuilder) {
            $actions[] = $actionBuilder->buildTemplateAction();
        }

        $this->template = [
            'type' => TemplateType::CONFIRM,
            'text' => $this->text,
            'actions' => $actions,
        ];

        return $this->template;
    }
74770
public function getTemplate()
    {
        if($this->template != ''){
            return $this->template;
        }

        if(($defaultTemplate = $this->container->getConfigInstance()->getDefaultTemplateName()) == null){
            return '';
        }

        return $defaultTemplate;
    }