object PlayMagic

Defines a magic helper for Play templates.

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

Value Members

  1. def toHtmlArgs(args: Map[Symbol, Any]): Html

    Generates a set of valid HTML attributes.

    Generates a set of valid HTML attributes.

    For example:

    toHtmlArgs(Seq(Symbol("id") -> "item", Symbol("style") -> "color:red"))
  2. def translate(arg: Any)(implicit p: MessagesProvider): Any

    Uses the passed MessagesProvider to translates the given argument.

    Uses the passed MessagesProvider to translates the given argument. If the argument is a raw html, it will translate its string representation and will then again return raw html. The argument to translate can also be a sequence that wraps a string or raw html. In this case every element of the sequence will be translated.