TwirlFeatureImports

play.twirl.api.TwirlFeatureImports$

Imports that provide Twirl language features.

This includes:

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

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Type members

Classlikes

implicit class TwirlDefaultValue(default: Any)

Provides default values, such that an empty sequence, string, option, false boolean, or null will render the default value.

Provides default values, such that an empty sequence, string, option, false boolean, or null will render the default value.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def defining[T](t: T)(handler: T => Any): Any

Provides the @defining language feature, that lets you set a local val that can be reused.

Provides the @defining language feature, that lets you set a local val that can be reused.

Attributes

handler

The block to handle it.

t

The defined val.

def using[T](t: T): T

Provides the @using language feature.

Provides the @using language feature.

Attributes

Implicits

Implicits

final implicit def TwirlDefaultValue(default: Any): TwirlDefaultValue

Provides default values, such that an empty sequence, string, option, false boolean, or null will render the default value.

Provides default values, such that an empty sequence, string, option, false boolean, or null will render the default value.

Attributes

implicit def twirlIterableToBoolean(x: Iterable[_]): Boolean

Adds "truthiness" to iterables, making them false if they are empty.

Adds "truthiness" to iterables, making them false if they are empty.

Attributes

implicit def twirlOptionToBoolean(x: Option[_]): Boolean

Adds "truthiness" to options, making them false if they are empty.

Adds "truthiness" to options, making them false if they are empty.

Attributes

implicit def twirlStringToBoolean(x: String): Boolean

Adds "truthiness" to strings, making them false if they are empty.

Adds "truthiness" to strings, making them false if they are empty.

Attributes