package api
- Source
- package.scala
- Alphabetic
- By Inheritance
- api
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
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
- case class BaseScalaTemplate[T <: Appendable[T], F <: Format[T]](format: F) extends Product with Serializable
-
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
-
trait
Content extends AnyRef
Generic type representing content to be sent over an HTTP response.
-
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.
-
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.
-
class
JavaScript extends BufferedContent[JavaScript]
Type used in default JavaScript templates.
-
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
andjs
. - trait Template0[Result] extends AnyRef
- trait Template1[A, Result] extends AnyRef
- trait Template10[A, B, C, D, E, F, G, H, I, J, Result] extends AnyRef
- trait Template11[A, B, C, D, E, F, G, H, I, J, K, Result] extends AnyRef
- trait Template12[A, B, C, D, E, F, G, H, I, J, K, L, Result] extends AnyRef
- trait Template13[A, B, C, D, E, F, G, H, I, J, K, L, M, Result] extends AnyRef
- trait Template14[A, B, C, D, E, F, G, H, I, J, K, L, M, N, Result] extends AnyRef
- trait Template15[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, Result] extends AnyRef
- trait Template16[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Result] extends AnyRef
- trait Template17[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, Result] extends AnyRef
- trait Template18[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, Result] extends AnyRef
- trait Template19[A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, Result] extends AnyRef
- trait Template2[A, B, Result] extends AnyRef
- 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
- 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
- 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
- trait Template3[A, B, C, Result] extends AnyRef
- trait Template4[A, B, C, D, Result] extends AnyRef
- trait Template5[A, B, C, D, E, Result] extends AnyRef
- trait Template6[A, B, C, D, E, F, Result] extends AnyRef
- trait Template7[A, B, C, D, E, F, G, Result] extends AnyRef
- trait Template8[A, B, C, D, E, F, G, H, Result] extends AnyRef
- trait Template9[A, B, C, D, E, F, G, H, I, Result] extends AnyRef
-
class
Txt extends BufferedContent[Txt]
Content type used in default text templates.
-
class
Xml extends BufferedContent[Xml]
Content type used in default XML templates.
Value Members
- object Formats
-
object
Html
Helper for HTML utility methods.
-
object
HtmlFormat extends Format[Html]
Formatter for HTML content.
-
object
JavaScript
Helper for JavaScript utility methods.
-
object
JavaScriptFormat extends Format[JavaScript]
Formatter for JavaScript content.
- object MimeTypes
-
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)
-
object
TwirlHelperImports
Imports for useful Twirl helpers.
-
object
Txt
Helper for utilities Txt methods.
-
object
TxtFormat extends Format[Txt]
Formatter for text content.
-
object
Xml
Helper for XML utility methods.
-
object
XmlFormat extends Format[Xml]
Formatter for XML content.
Deprecated Value Members
-
object
TemplateMagic
- Annotations
- @deprecated
- Deprecated
(Since version 1.2.0) Use TwirlDefaultImports instead