Skip to content

Commit

Permalink
Merge pull request #14737 from cakephp/doc-fixes
Browse files Browse the repository at this point in the history
Fix path docs
  • Loading branch information
ADmad committed Jun 23, 2020
2 parents 9cb11c9 + 9a96db5 commit 12e8852
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/Controller/Component/FlashComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public function set($message, array $options = []): void
* Magic method for verbose flash methods based on element names.
*
* For example: $this->Flash->success('My message') would use the
* `success.php` element under `templates/Element/Flash` for rendering the
* `success.php` element under `templates/element/flash/` for rendering the
* flash message.
*
* If you make consecutive calls to this method, the messages will stack (if they are
Expand All @@ -126,7 +126,7 @@ public function set($message, array $options = []): void
* 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.php` element under `plugins/PluginName/templates/Element/Flash` for
* use the `warning.php` element under `plugins/PluginName/templates/element/flash/` for
* rendering the flash message.
*
* @param string $name Element name to use.
Expand Down
20 changes: 10 additions & 10 deletions src/View/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,15 @@ class View implements EventDispatcherInterface

/**
* The name of the template file to render. The name specified
* is the filename in /templates/<SubFolder> without the .php extension.
* is the filename in `templates/<SubFolder>/` without the .php extension.
*
* @var string
*/
protected $template;

/**
* The name of the layout file to render the template inside of. The name specified
* is the filename of the layout in /templates/Layout without the .php
* is the filename of the layout in `templates/layout/` without the .php
* extension.
*
* @var string
Expand Down Expand Up @@ -526,7 +526,7 @@ public function setTheme(?string $theme)

/**
* Get the name of the template file to render. The name specified is the
* filename in /templates/<SubFolder> without the .php extension.
* filename in `templates/<SubFolder>/` without the .php extension.
*
* @return string
*/
Expand All @@ -537,7 +537,7 @@ public function getTemplate(): string

/**
* Set the name of the template file to render. The name specified is the
* filename in /templates/<SubFolder> without the .php extension.
* filename in `templates/<SubFolder>/` without the .php extension.
*
* @param string $name Template file name to set.
* @return $this
Expand All @@ -551,7 +551,7 @@ public function setTemplate(string $name)

/**
* Get the name of the layout file to render the template inside of.
* The name specified is the filename of the layout in /templates/Layout
* The name specified is the filename of the layout in `templates/layout/`
* without the .php extension.
*
* @return string
Expand All @@ -563,7 +563,7 @@ public function getLayout(): string

/**
* Set the name of the layout file to render the template inside of.
* The name specified is the filename of the layout in /templates/Layout
* The name specified is the filename of the layout in `templates/layout/`
* without the .php extension.
*
* @param string $name Layout file name to set.
Expand Down Expand Up @@ -615,7 +615,7 @@ public function getConfig(?string $key = null, $default = null)
* This realizes the concept of Elements, (or "partial layouts") and the $params array is used to send
* data to be used in the element. Elements can be cached improving performance by using the `cache` option.
*
* @param string $name Name of template file in the /templates/Element/ folder,
* @param string $name Name of template file in the `templates/element/` folder,
* or `MyPlugin.template` to use the template element from MyPlugin. If the element
* is not found in the plugin, the normal view path cascade will be searched.
* @param array $data Array of data to be made available to the rendered view (i.e. the Element)
Expand Down Expand Up @@ -699,7 +699,7 @@ public function cache(callable $block, array $options = []): string
/**
* Checks if an element exists
*
* @param string $name Name of template file in the /templates/Element/ folder,
* @param string $name Name of template file in the `templates/element/` folder,
* or `MyPlugin.template` to check the template element from MyPlugin. If the element
* is not found in the plugin, the normal view path cascade will be searched.
* @return bool Success
Expand All @@ -722,8 +722,8 @@ public function elementExists(string $name): bool
*
* If View::$autoLayout is set to `false`, the template will be returned bare.
*
* Template and layout names can point to plugin templates/layouts. Using the `Plugin.template` syntax
* a plugin template/layout can be used instead of the app ones. If the chosen plugin is not found
* Template and layout names can point to plugin templates or layouts. Using the `Plugin.template` syntax
* a plugin template/layout/ can be used instead of the app ones. If the chosen plugin is not found
* the template will be located along the regular view path cascade.
*
* @param string|null $template Name of template file to use
Expand Down
6 changes: 3 additions & 3 deletions src/View/ViewBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ public function getTheme(): ?string

/**
* Sets the name of the view file to render. The name specified is the
* filename in /templates/<SubFolder> without the .php extension.
* filename in `templates/<SubFolder>/` without the .php extension.
*
* @param string|null $name View file name to set, or null to remove the template name.
* @return $this
Expand All @@ -368,7 +368,7 @@ public function setTemplate(?string $name)

/**
* Gets the name of the view file to render. The name specified is the
* filename in /templates/<SubFolder> without the .php extension.
* filename in `templates/<SubFolder>/` without the .php extension.
*
* @return string|null
*/
Expand All @@ -379,7 +379,7 @@ public function getTemplate(): ?string

/**
* Sets the name of the layout file to render the view inside of.
* The name specified is the filename of the layout in /templates/Layout
* The name specified is the filename of the layout in `templates/layout/`
* without the .php extension.
*
* @param string|null $name Layout file name to set.
Expand Down

0 comments on commit 12e8852

Please sign in to comment.