ApplicationTrait
class ApplicationTrait extends Application
TODO Traitが使えるようになったら不要になる
Methods
Application Shortcut Methods
No description
No description
No description
No description
No description
No description
No description
No description
Creates and returns a form builder instance
Adds a log record.
Gets a user from the Security context.
Encodes the raw password.
Checks if the attributes are granted against the current authentication token and optionally supplied object.
Sends an email.
Translates the given message.
Translates the given choice message by choosing a translation according to a number.
Renders a view and returns a Response.
Renders a view.
Generates a path from the given parameters.
Generates an absolute URL from the given parameters.
Details
at line 20
addSuccess($message, $namespace = 'front')
Application Shortcut Methods
at line 25
addError($message, $namespace = 'front')
at line 30
addDanger($message, $namespace = 'front')
at line 35
addWarning($message, $namespace = 'front')
at line 40
addInfo($message, $namespace = 'front')
at line 45
addRequestError($message, $namespace = 'front')
at line 50
clearMessage()
at line 55
deleteMessage()
at line 61
setLoginTargetPath($targetPath)
at line 86
FormBuilder
form(mixed $data = null, array $options = array())
Creates and returns a form builder instance
at line 101
bool
log(string $message, array $context = array(), int $level = Logger::INFO)
Adds a log record.
at line 115
mixed
user()
Gets a user from the Security context.
at line 130
string
encodePassword(UserInterface $user, string $password)
Encodes the raw password.
at line 145
bool
isGranted(mixed $attributes, mixed $object = null)
Checks if the attributes are granted against the current authentication token and optionally supplied object.
at line 159
int
mail(Swift_Message $message, array $failedRecipients = null)
Sends an email.
at line 175
string
trans(string $id, array $parameters = array(), string $domain = 'messages', string $locale = null)
Translates the given message.
at line 191
string
transChoice(string $id, int $number, array $parameters = array(), string $domain = 'messages', string $locale = null)
Translates the given choice message by choosing a translation according to a number.
at line 208
Response
render(string $view, array $parameters = array(), Response $response = null)
Renders a view and returns a Response.
To stream a view, pass an instance of StreamedResponse as a third argument.
at line 234
Response
renderView(string $view, array $parameters = array())
Renders a view.
at line 248
string
path(string $route, mixed $parameters = array())
Generates a path from the given parameters.
at line 261
string
url(string $route, mixed $parameters = array())
Generates an absolute URL from the given parameters.