public static function getTinyTemplates()
	{
		$strDir = Config::get('uploadPath') . '/tiny_templates';
		$rootDir = System::getContainer()->getParameter('kernel.project_dir');

		if (!is_dir($rootDir . '/' . $strDir))
		{
			return '';
		}

		$arrFiles = array();
		$arrTemplates = scan($rootDir . '/' . $strDir);

		foreach ($arrTemplates as $strFile)
		{
			if (strncmp('.', $strFile, 1) !== 0 && is_file($rootDir . '/' . $strDir . '/' . $strFile))
			{
				$arrFiles[] = '{ title: "' . $strFile . '", url: "' . $strDir . '/' . $strFile . '" }';
			}
		}

		return implode(",\n", $arrFiles) . "\n";
	}
public static function getTinyTemplates()
	{
		$strDir = Config::get('uploadPath') . '/tiny_templates';
		$rootDir = System::getContainer()->getParameter('kernel.project_dir');

		if (!is_dir($rootDir . '/' . $strDir))
		{
			return '';
		}

		$arrFiles = array();
		$arrTemplates = scan($rootDir . '/' . $strDir);

		foreach ($arrTemplates as $strFile)
		{
			if (strncmp('.', $strFile, 1) !== 0 && is_file($rootDir . '/' . $strDir . '/' . $strFile))
			{
				$arrFiles[] = '{ title: "' . $strFile . '", url: "' . $strDir . '/' . $strFile . '" }';
			}
		}

		return implode(",\n", $arrFiles) . "\n";
	}
public static function getTinyTemplates ( ) { $ strDir = Config :: get ( 'uploadPath' ) . '/tiny_templates' ; $ rootDir = System :: getContainer ( ) -> getParameter ( 'kernel.project_dir' ) ; if ( ! is_dir ( $ rootDir . '/' . $ strDir ) ) { return '' ; } $ arrFiles = array ( ) ; $ arrTemplates = scan ( $ rootDir . '/' . $ strDir ) ; foreach ( $ arrTemplates as $ strFile ) { if ( strncmp ( '.' , $ strFile , 1 ) !== 0 && is_file ( $ rootDir . '/' . $ strDir . '/' . $ strFile ) ) { $ arrFiles [ ] = '{ title: "' . $ strFile . '", url: "' . $ strDir . '/' . $ strFile . '" }' ; } } return implode ( ",\n" , $ arrFiles ) . "\n" ; }
Return a list of TinyMCE templates as JSON string

@return string
Return a list of TinyMCE templates as JSON string