Skip to content

Commit

Permalink
Updating FlashComponent::__call() docblock
Browse files Browse the repository at this point in the history
- [x] element usage example
- [x] fixing docblock paths
  • Loading branch information
andretefras committed Feb 4, 2015
1 parent 58e69c5 commit e93732d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Controller/Component/FlashComponent.php
Expand Up @@ -103,8 +103,15 @@ public function set($message, array $options = [])
* Magic method for verbose flash methods based on element names.
*
* For example: $this->Flash->success('My message') would use the
* success.ctp element under `App/Template/Element/Flash` for rendering the
* success.ctp element under `src/Template/Element/Flash` for rendering the
* flash message.
*
* Note that the parameter `element` will be always overridden. In order to call a
* specific element from a plugin, you should set the `plugin` option in $args.
*
* For example: $this->Flash->warning('My message', ['plugin' => 'PluginName']) would
* use the warning.ctp element under `plugins/src/Template/Element/Flash` for rendering
* the flash message.
*
* @param string $name Element name to use.
* @param array $args Parameters to pass when calling `FlashComponent::set()`.
Expand Down

0 comments on commit e93732d

Please sign in to comment.