-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6233 from HavokInspiration/3.0-prefix-elements
Autoswitch elements to prefix path. When a controller runs in a prefixed route/namespace it will automatically append that prefix to the view paths used to locate view files.
- Loading branch information
Showing
14 changed files
with
121 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
tests/test_app/Plugin/TestPlugin/src/Template/Admin/Element/plugin_element.ctp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
this is the plugin prefixed element using params[plugin] |
1 change: 1 addition & 0 deletions
1
tests/test_app/Plugin/TestPlugin/src/Template/Admin/Element/test_plugin_element.ctp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
this is the test set using View::$plugin plugin prefixed element |
2 changes: 1 addition & 1 deletion
2
tests/test_app/Plugin/TestPlugin/src/Template/Element/Flash/plugin_element.ctp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<?= 'this is the plugin element'; ?> | ||
this is the plugin element |
2 changes: 1 addition & 1 deletion
2
tests/test_app/Plugin/TestPlugin/src/Template/Element/plugin_element.ctp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<?= 'this is the plugin element using params[plugin]'; ?> | ||
this is the plugin element using params[plugin] |
2 changes: 1 addition & 1 deletion
2
tests/test_app/Plugin/TestPlugin/src/Template/Element/test_plugin_element.ctp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<?= 'this is the test set using View::$plugin plugin element'; ?> | ||
this is the test set using View::$plugin plugin element |
1 change: 1 addition & 0 deletions
1
tests/test_app/TestApp/Template/Admin/Element/Flash/default.ctp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
flash element from Admin prefix folder |
2 changes: 2 additions & 0 deletions
2
tests/test_app/TestApp/Template/Admin/Element/extended_element.ctp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?php $this->extend('parent_element'); ?> | ||
Prefix Element content. |
1 change: 1 addition & 0 deletions
1
tests/test_app/TestApp/Template/Admin/Element/prefix_element.ctp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
this is a prefixed test element |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
this is the test prefix element |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<?= 'this is the test element'; ?> | ||
this is the test element |
1 change: 1 addition & 0 deletions
1
tests/test_app/TestApp/Template/FooPrefix/BarPrefix/Element/prefix_element.ctp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
this is a nested prefixed test element |