Browse Source

Updating FlashComponent::__call() docblock

- [x] element usage example
- [x] fixing docblock paths
André Teixeira 11 years ago
parent
commit
e93732d248
1 changed files with 8 additions and 1 deletions
  1. 8 1
      src/Controller/Component/FlashComponent.php

+ 8 - 1
src/Controller/Component/FlashComponent.php

@@ -103,8 +103,15 @@ class FlashComponent extends Component
      * 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()`.