类 GetFontListMethod

java.lang.Object
com.publiccms.common.base.BaseMethod
com.publiccms.views.method.tools.GetFontListMethod
所有已实现的接口:
freemarker.template.TemplateMethodModel, freemarker.template.TemplateMethodModelEx, freemarker.template.TemplateModel

@Component public class GetFontListMethod extends BaseMethod
getFontList 获取系统字体列表

返回结果

return result

戻り値

  • font list:字体名称列表

使用示例

usage example

使用例

<#list getFontList() as font>${font}</#list>

<script>
$.getJSON('${site.dynamicPath}api/method/getFontList?appToken=接口访问授权Token', function(data){
console.log(data);
});
</script>
 
  • 构造器详细资料

    • GetFontListMethod

      public GetFontListMethod()
  • 方法详细资料

    • execute

      public Object execute(List<freemarker.template.TemplateModel> arguments) throws freemarker.template.TemplateModelException
      指定者:
      execute 在类中 BaseMethod
      抛出:
      freemarker.template.TemplateModelException
    • needAppToken

      public boolean needAppToken()
      指定者:
      needAppToken 在类中 BaseMethod
      返回:
      whether to need app token
    • minParametersNumber

      public int minParametersNumber()
      指定者:
      minParametersNumber 在类中 BaseMethod
      返回:
      min parameters number