Return a list of all the accepted template formats you can use to generate your document

@return array

@throws StatusException
177024
public function getAcceptedTemplateFormats()
    {
        try {
            $ret    = array();
            $result = $this->getSoapClient()->GetTemplateFormats();
            if ( isset($result->GetTemplateFormatsResult->string) ) {
                $ret = $result->GetTemplateFormatsResult->string;
                $ret = array_map('strtolower' , $ret);
            }

            return $ret;
        } catch ( SoapException $ex ) {
            throw new StatusException('Error while getting the list of accepted template formats' , $ex);
        }
    }
175422
public function getTemplateHtmlAndScript()
    {
        $html = '';
        $scripts = [];

        /* @var Field $field */
        foreach ($this->fields() as $field) {

            //when field render, will push $script to Merchant
            $html .= $field->render();

            /*
             * Get and remove the last script of Merchant::$script stack.
             */
            if ($field->getScript()) {
                $scripts[] = array_pop(Merchant::$script);
            }
        }

        return [$html, implode("\r\n", $scripts)];
    }
158224
public function listTemplateNames()
    {
        $this->setUpTemplate();
        $ret = array();
        foreach ($this->templates as $key => $val) {
            $ret[] = $key;
        }
        return $ret;
    }
426069
public function getAcceptedFormats()
    {
        try {
            $ret    = array();
            $result = $this->getSoapClient()->GetImageImportFormats();
            if ( isset($result->GetImageImportFormatsResult->string) ) {
                $ret = $result->GetImageImportFormatsResult->string;
                $ret = array_map('strtolower' , $ret);
            }

            return $ret;
        } catch ( SoapException $ex ) {
            throw new StatusException('Error while obtaining the list of accepted image formats' , $ex);
        }
    }
473877
public function templateExtensions()
    {
        return array(
            new Extensions\Template\Extension\Debug(
                $this->components()->debug()
            ),
            new Extensions\Template\Extension\RouteTranslator(
                'http',
                $this->builder->http()->routeTranslator()
            )
        );
    }
1125848
public function getValidElementTypes(){
        return array(
            'oat\\taoQtiItem\\model\\qti\\Img',
            'oat\\taoQtiItem\\model\\qti\\Math',
            'oat\\taoQtiItem\\model\\qti\\feedback\\Feedback',
            \oat\taoQtiItem\model\qti\QtiObject::class,
            'oat\\taoQtiItem\\model\\qti\\Tooltip',
            'oat\\taoQtiItem\\model\\qti\\interaction\\Interaction',
            'oat\\taoQtiItem\\model\\qti\\RubricBlock',
            'oat\\taoQtiItem\\model\\qti\\InfoControl',
            'oat\\taoQtiItem\\model\\qti\\XInclude',
            \oat\taoQtiItem\model\qti\Table::class,
        );
    }
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,
        ];
    }
477115
public function getDynamicStyles()
    {
        $rawDocFont = $this->helper->getConfigValue(Config::XML_PATH_CONNECTOR_DYNAMIC_DOC_FONT);
        return [
            'nameStyle' => explode(
                ',',
                $this->helper->getConfigValue(Config::XML_PATH_CONNECTOR_DYNAMIC_NAME_STYLE)
            ),
            'priceStyle' => explode(
                ',',
                $this->helper->getConfigValue(Config::XML_PATH_CONNECTOR_DYNAMIC_PRICE_STYLE)
            ),
            'linkStyle' => explode(
                ',',
                $this->helper->getConfigValue(Config::XML_PATH_CONNECTOR_DYNAMIC_LINK_STYLE)
            ),
            'otherStyle' => explode(
                ',',
                $this->helper->getConfigValue(Config::XML_PATH_CONNECTOR_DYNAMIC_OTHER_STYLE)
            ),
            'nameColor' => $this->helper->getConfigValue(Config::XML_PATH_CONNECTOR_DYNAMIC_NAME_COLOR),
            'fontSize' => $this->helper->getConfigValue(Config::XML_PATH_CONNECTOR_DYNAMIC_NAME_FONT_SIZE),
            'priceColor' => $this->helper->getConfigValue(Config::XML_PATH_CONNECTOR_DYNAMIC_PRICE_COLOR),
            'priceFontSize' => $this->helper->getConfigValue(Config::XML_PATH_CONNECTOR_DYNAMIC_PRICE_FONT_SIZE),
            'urlColor' => $this->helper->getConfigValue(Config::XML_PATH_CONNECTOR_DYNAMIC_LINK_COLOR),
            'urlFontSize' => $this->helper->getConfigValue(Config::XML_PATH_CONNECTOR_DYNAMIC_LINK_FONT_SIZE),
            'otherColor' => $this->helper->getConfigValue(Config::XML_PATH_CONNECTOR_DYNAMIC_OTHER_COLOR),
            'otherFontSize' => $this->helper->getConfigValue(Config::XML_PATH_CONNECTOR_DYNAMIC_OTHER_FONT_SIZE),
            'docFont' => $this->getSanitisedFont($rawDocFont),
            'docBackgroundColor' => $this->helper->getConfigValue(Config::XML_PATH_CONNECTOR_DYNAMIC_DOC_BG_COLOR),
            'dynamicStyling' => $this->helper->getConfigValue(Config::XML_PATH_CONNECTOR_DYNAMIC_STYLING),
        ];
    }
652904
public function getAcceptableContentTypes()
    {
        if (null !== $this->acceptableContentTypes) {
            return $this->acceptableContentTypes;
        }

        return $this->acceptableContentTypes = array_keys(AcceptHeader::fromString($this->headers->get('Accept'))->all());
    }
1281902
public function templates()
    {
        try {
            $directory = $this->getTemplateDir();
            $files = File::files($directory);
        } catch (Exception $e) {
            $files = File::files(base_path('vendor/typicms/pages/src/resources/views/public'));
        }
        $templates = [];
        foreach ($files as $file) {
            $filename = File::name($file);
            if ($filename === 'default.blade') {
                continue;
            }
            $name = str_replace('.blade', '', $filename);
            if ($name[0] != '_' && $name != 'master') {
                $templates[$name] = ucfirst($name);
            }
        }

        return ['' => 'Default'] + $templates;
    }
1019782
protected function getContentTemplate()
	{
		$attributes = [
			'data'          => $this->attributes['src'],
			'style'         => $this->attributes['style'],
			'type'          => 'application/x-shockwave-flash',
			'typemustmatch' => ''
		];

		$flashVarsParam = '';
		if (isset($this->attributes['flashvars']))
		{
			$flashVarsParam = $this->generateParamElement('flashvars', $this->attributes['flashvars']);
		}

		$template = '<object>'
		          . $this->generateAttributes($attributes)
		          . $this->generateParamElement('allowfullscreen', 'true')
		          . $flashVarsParam
		          . '</object>';

		return $template;
	}
1119815
public function getAvailable()
    {
        return [
            self::TEMAPLATE_PAPER_FORM_A4 => 'A4',
            self::TEMAPLATE_PAPER_FORMAT_A3 => 'A3',
            self::TEMAPLATE_PAPER_FORMAT_A5 => 'A5',
            self::TEMAPLATE_PAPER_FORMAT_A6 => 'A6',
            self::TEMAPLATE_PAPER_FORMAT_LETTER => 'Letter',
            self::TEMAPLATE_PAPER_FORMAT_LEGAL => 'Legal',
        ];
    }
1282855
protected function _defaultFormatters()
    {
        return [
            ':name' => function ($value, &$states) {
                list($alias, $field) = $this->undot($value);
                if (isset($states['aliases'][$alias])) {
                    $alias = $states['aliases'][$alias];
                }
                $escaped = $this->name($value, $states['aliases']);
                $schema = isset($states['schemas'][$alias]) ? $states['schemas'][$alias] : null;
                $states['name'] = $field;
                $states['schema'] = $schema;
                return $escaped;
            },
            ':value' => function ($value, $states) {
                return $this->value($value, $states);
            },
            ':plain' => function ($value, $states) {
                return (string) $value;
            }
        ];
    }
681617
public function GetTemplateFiles()
	{
		$files = array();
		
		list($nothing,$data) = explode("[files]", $this->GetConfigFileContents(),2);
		
		if ($data)
		{
			$lines = explode("\n",$data);
			
			foreach ($lines as $line)
			{
				if ($line) $files[] = new TemplateFile($line);
			}
		}
		
		return $files;
	}
116010
public function getStyles()
	{
		$list	= array();
		$query	= "//style";
		$tags	= $this->getTagsByXPath( $query );
		foreach( $tags as $tag )
			$list[]	= $tag->textContent;
		return $list;
	}
1373329
public function buildTemplate()
    {
        if (!empty($this->template)) {
            return $this->template;
        }

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

        $this->template = [
            'thumbnailImageUrl' => $this->thumbnailImageUrl,
            'title' => $this->title,
            'text' => $this->text,
            'actions' => $actions,
        ];

        if ($this->imageBackgroundColor) {
            $this->template['imageBackgroundColor'] = $this->imageBackgroundColor;
        }

        return $this->template;
    }
1048790
protected function generateTemplate()
    {
        $st_annotations = $this->extractAnnotations();

        $template = array();
        $counter = 0;
        $section = null;
        $partial_template = $this->loadPartialTemplate('main');

        foreach ($st_annotations as $class => $methods) {
            foreach ($methods as $name => $docs) {
                if (isset($docs['ApiDescription'][0]['section'])) {
                  $section = $docs['ApiDescription'][0]['section'];
                }elseif(isset($docs['ApiSector'][0]['name'])){
                    $section = $docs['ApiSector'][0]['name'];
                }else{
                    $section = $class;
                }
                if (0 === count($docs)) {
                    continue;
                }

                $sampleOutput = $this->generateSampleOutput($docs, $counter);

                $tr = array(
                    '{{ elt_id }}'                  => $counter,
                    '{{ method }}'                  => $this->generateBadgeForMethod($docs),
                    '{{ route }}'                   => $docs['ApiRoute'][0]['name'],
                    '{{ description }}'             => $docs['ApiDescription'][0]['description'],
                    '{{ headers }}'                 => $this->generateHeadersTemplate($counter, $docs),
                    '{{ parameters }}'              => $this->generateParamsTemplate($counter, $docs),
                    '{{ body }}'                    => $this->generateBodyTemplate($counter, $docs),
                    '{{ sandbox_form }}'            => $this->generateSandboxForm($docs, $counter),
                    '{{ sample_response_headers }}' => $sampleOutput[0],
                    '{{ sample_response_body }}'    => $sampleOutput[1]
                );

                $template[$section][] = strtr($partial_template, $tr);
                $counter++;
            }
        }

        $output = '';

        foreach ($template as $key => $value) {
          array_unshift($value, '<h2>' . $key . '</h2>');
          $output .= implode(PHP_EOL, $value);
        }

        $this->saveTemplate($output, $this->_output_file);

        return true;
    }