package api

Source
package.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. api
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Package Members

  1. package utils

Type Members

  1. trait Appendable[T] extends AnyRef

    A type that works with BaseScalaTemplate This used to support +=, but no longer is required to.

    A type that works with BaseScalaTemplate This used to support +=, but no longer is required to.

    To do

    Change name to reflect not appendable

  2. case class BaseScalaTemplate[T <: Appendable[T], F <: Format[T]](format: F) extends Product with Serializable
  3. abstract class BufferedContent[A <: BufferedContent[A]] extends Appendable[A] with Content

    Appendable content using a StringBuilder.

    Appendable content using a StringBuilder. Either specify elements or text, not both.

    Using an Either[TraversableOnce[A], String] impacts performance in an already contentious part of code, so it has been done with both parameters instead.

    A

    self-type

  4. trait Content extends AnyRef

    Generic type representing content to be sent over an HTTP response.

  5. trait Format[T <: Appendable[T]] extends AnyRef

    A template format defines how to properly integrate content for a type T (e.g.

    A template format defines how to properly integrate content for a type T (e.g. to prevent cross-site scripting attacks)

    T

    The underlying type that this format applies to.

  6. class Html extends BufferedContent[Html]

    Content type used in default HTML templates.

    Content type used in default HTML templates.

    This has 3 states, either it's a tree of elements, or a leaf, if it's a leaf, it's either safe text, or unsafe text that needs to be escaped when written out.

  7. class JavaScript extends BufferedContent[JavaScript]

    Type used in default JavaScript templates.

  8. implicit final class StringInterpolation extends AnyVal

    Brings the template engine as a string interpolator.

    Brings the template engine as a string interpolator.

    Basic usage:

    import play.twirl.api.StringInterpolation
    
    val name = "Martin"
    val htmlFragment: Html = html"<div>Hello $name</div>"

    Three interpolators are available: html, xml and js.

  9. trait Template0[Result] extends AnyRef
  10. trait Template1[A, Result] extends AnyRef
  11. trait Template10[A, B, C, D, E, F, G, H, I, J, Result] extends AnyRef
  12. trait Template11[A, B, C, D, E, F, G, H, I, J, K, Result] extends AnyRef
  13. trait Template12[A, B, C, D, E, F, G, H, I, J, K, L, Result] extends AnyRef
  14. trait Template13[A, B, C, D, E, F, G, H, I, J, K, L, M, Result] extends AnyRef
  15. trait Template14[A, B, C, D, E, F, G, H, I, J, K, L, M, N, Result] extends AnyRef
  16. trait Template15[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, Result] extends AnyRef
  17. trait Template16[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Result] extends AnyRef
  18. trait Template17[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, Result] extends AnyRef
  19. trait Template18[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, Result] extends AnyRef
  20. trait Template19[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, Result] extends AnyRef
  21. trait Template2[A, B, Result] extends AnyRef
  22. trait Template20[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, Result] extends AnyRef
  23. trait Template21[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, Result] extends AnyRef
  24. trait Template22[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, Result] extends AnyRef
  25. trait Template3[A, B, C, Result] extends AnyRef
  26. trait Template4[A, B, C, D, Result] extends AnyRef
  27. trait Template5[A, B, C, D, E, Result] extends AnyRef
  28. trait Template6[A, B, C, D, E, F, Result] extends AnyRef
  29. trait Template7[A, B, C, D, E, F, G, Result] extends AnyRef
  30. trait Template8[A, B, C, D, E, F, G, H, Result] extends AnyRef
  31. trait Template9[A, B, C, D, E, F, G, H, I, Result] extends AnyRef
  32. class Txt extends BufferedContent[Txt]

    Content type used in default text templates.

  33. class Xml extends BufferedContent[Xml]

    Content type used in default XML templates.

Value Members

  1. object Formats
  2. object Html

    Helper for HTML utility methods.

  3. object HtmlFormat extends Format[Html]

    Formatter for HTML content.

  4. object JavaScript

    Helper for JavaScript utility methods.

  5. object JavaScriptFormat extends Format[JavaScript]

    Formatter for JavaScript content.

  6. object MimeTypes
  7. object TwirlFeatureImports

    Imports that provide Twirl language features.

    Imports that provide Twirl language features.

    This includes:

    - @defining - @using - iterable/option/string as boolean for if statements - default values (maybeFoo ? defaultFoo)

  8. object TwirlHelperImports

    Imports for useful Twirl helpers.

  9. object Txt

    Helper for utilities Txt methods.

  10. object TxtFormat extends Format[Txt]

    Formatter for text content.

  11. object Xml

    Helper for XML utility methods.

  12. object XmlFormat extends Format[Xml]

    Formatter for XML content.

Deprecated Value Members

  1. object TemplateMagic
    Annotations
    @deprecated
    Deprecated

    (Since version 1.2.0) Use TwirlDefaultImports instead

Inherited from AnyRef

Inherited from Any

Ungrouped