37
37
* in from the controller to render the results of the controller action. Often this is HTML,
38
38
* but can also take the form of JSON, XML, PDF's or streaming files.
39
39
*
40
- * CakePHP uses a two-step-view pattern. This means that the view content is rendered first,
41
- * and then inserted into the selected layout. This also means you can pass data from the view to the
40
+ * CakePHP uses a two-step-view pattern. This means that the template content is rendered first,
41
+ * and then inserted into the selected layout. This also means you can pass data from the template to the
42
42
* layout using `$this->set()`
43
43
*
44
44
* View class supports using plugins as themes. You can set
@@ -126,7 +126,7 @@ class View implements EventDispatcherInterface
126
126
public $ template = null ;
127
127
128
128
/**
129
- * The name of the layout file to render the view inside of. The name specified
129
+ * The name of the layout file to render the template inside of. The name specified
130
130
* is the filename of the layout in /app/Template/Layout without the .ctp
131
131
* extension.
132
132
*
@@ -143,7 +143,7 @@ class View implements EventDispatcherInterface
143
143
144
144
/**
145
145
* Turns on or off CakePHP's conventional mode of applying layout files. On by default.
146
- * Setting to off means that layouts will not be automatically applied to rendered views .
146
+ * Setting to off means that layouts will not be automatically applied to rendered templates .
147
147
*
148
148
* @var bool
149
149
*/
@@ -157,7 +157,7 @@ class View implements EventDispatcherInterface
157
157
protected $ _ext = '.ctp ' ;
158
158
159
159
/**
160
- * Sub-directory for this view file. This is often used for extension based routing.
160
+ * Sub-directory for this template file. This is often used for extension based routing.
161
161
* Eg. With an `xml` extension, $subDir would be `xml/`
162
162
*
163
163
* @var string
@@ -377,7 +377,7 @@ public function layoutPath($path = null)
377
377
/**
378
378
* Turns on or off CakePHP's conventional mode of applying layout files.
379
379
* On by default. Setting to off means that layouts will not be
380
- * automatically applied to rendered views .
380
+ * automatically applied to rendered templates .
381
381
*
382
382
* @param bool $autoLayout Boolean to turn on/off. If null returns current value.
383
383
* @return bool|void
@@ -423,7 +423,7 @@ public function template($name = null)
423
423
}
424
424
425
425
/**
426
- * Get/set the name of the layout file to render the view inside of.
426
+ * Get/set the name of the layout file to render the template inside of.
427
427
* The name specified is the filename of the layout in /app/Template/Layout
428
428
* without the .ctp extension.
429
429
*
@@ -532,21 +532,21 @@ public function elementExists($name)
532
532
}
533
533
534
534
/**
535
- * Renders view for given view file and layout.
535
+ * Renders view for given template file and layout.
536
536
*
537
- * Render triggers helper callbacks, which are fired before and after the view are rendered,
537
+ * Render triggers helper callbacks, which are fired before and after the template are rendered,
538
538
* as well as before and after the layout. The helper callbacks are called:
539
539
*
540
540
* - `beforeRender`
541
541
* - `afterRender`
542
542
* - `beforeLayout`
543
543
* - `afterLayout`
544
544
*
545
- * If View::$autoRender is false and no `$layout` is provided, the view will be returned bare.
545
+ * If View::$autoRender is false and no `$layout` is provided, the template will be returned bare.
546
546
*
547
- * View and layout names can point to plugin views /layouts. Using the `Plugin.view ` syntax
548
- * a plugin view /layout can be used instead of the app ones. If the chosen plugin is not found
549
- * the view will be located along the regular view path cascade.
547
+ * Template and layout names can point to plugin templates /layouts. Using the `Plugin.template ` syntax
548
+ * a plugin template /layout can be used instead of the app ones. If the chosen plugin is not found
549
+ * the template will be located along the regular view path cascade.
550
550
*
551
551
* @param string|null $view Name of view file to use
552
552
* @param string|null $layout Layout to use.
@@ -582,7 +582,7 @@ public function render($view = null, $layout = null)
582
582
* Renders a layout. Returns output from _render(). Returns false on error.
583
583
* Several variables are created for use in layout.
584
584
*
585
- * @param string $content Content to render in a view , wrapped by the surrounding layout.
585
+ * @param string $content Content to render in a template , wrapped by the surrounding layout.
586
586
* @param string|null $layout Layout name
587
587
* @return mixed Rendered output, or false on error
588
588
* @throws \Cake\Core\Exception\Exception if there is an error in the view.
@@ -762,12 +762,12 @@ public function exists($name)
762
762
}
763
763
764
764
/**
765
- * Provides view or element extension/inheritance. Views can extends a
765
+ * Provides template or element extension/inheritance. Views can extends a
766
766
* parent view and populate blocks in the parent template.
767
767
*
768
- * @param string $name The view or element to 'extend' the current one with.
768
+ * @param string $name The template or element to 'extend' the current one with.
769
769
* @return void
770
- * @throws \LogicException when you extend a view with itself or make extend loops.
770
+ * @throws \LogicException when you extend a template with itself or make extend loops.
771
771
* @throws \LogicException when you extend an element which doesn't exist
772
772
*/
773
773
public function extend ($ name )
@@ -893,8 +893,8 @@ public function loadHelpers()
893
893
}
894
894
895
895
/**
896
- * Renders and returns output for given view filename with its
897
- * array of data. Handles parent/extended views .
896
+ * Renders and returns output for given template filename with its
897
+ * array of data. Handles parent/extended templates .
898
898
*
899
899
* @param string $viewFile Filename of the view
900
900
* @param array $data Data to include in rendered view. If empty the current
0 commit comments