PlayMagic

play.api.templates.PlayMagic
object PlayMagic

Defines a magic helper for Play templates.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
PlayMagic.type

Members list

Value members

Concrete methods

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"))

Attributes

def translate(arg: Any)(implicit p: MessagesProvider): Any

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.

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.

Attributes