Commit graph

205 commits

Author SHA1 Message Date
Jose Lorenzo Rodriguez
51635c2ca6 Merge remote-tracking branch 'origin/2.1' into 2.2
Conflicts:
	lib/Cake/Model/Model.php
	lib/Cake/Test/Case/Model/ModelValidationTest.php
2012-06-06 11:06:06 -04:30
Rachman Chavik
8966f1b324 create CakeRequest in View instead of in CakeEmail 2012-06-04 22:21:41 +07:00
Jelle Henkens
f7ce5262b7 Updating mixed @param documentation to seperate list of accepted types 2012-05-21 21:55:10 +01:00
mark_story
024e30eb42 Fix coding standards errors.
Adding a private property allows fixing of 4 naming standards
errors.
2012-05-20 16:06:41 -04:00
mark_story
4dc07b6d39 Merge branch '2.1' into 2.2 2012-05-16 21:08:06 -04:00
mark_story
cbd6cafed7 The event manager should be re-used.
View::__construct() gets the controller's event manager,
only to override it the first time getEventManager() is called.

Don't overwrite the Controller's event manager as it allows plugins
to more easily hook into the view process.
2012-05-14 21:18:09 -04:00
Jose Lorenzo Rodriguez
ed0c5a4746 Merge branch '2.2-lazy-helpers' into 2.2 2012-04-22 20:40:11 -04:30
Jose Lorenzo Rodriguez
8465538800 Merge branch '2.2-middleware' into 2.2 2012-04-22 17:17:36 -04:30
Justin A. Barnes
2c0cd1f2dd Fixed doc typo in lib/Cake/View/View.php 2012-04-16 18:30:10 -05:00
Jose Lorenzo Rodriguez
d17a471451 Initial middelware implementation 2012-04-15 11:39:08 -04:30
Majna
17cbcf4406 Fix rendering element from plugin controller.
Fixes #2661

Signed-off-by: mark_story <mark@mark-story.com>
2012-04-14 10:24:54 -04:00
Jose Lorenzo Rodriguez
f688d5777e Implementing helper lazy loading 2012-03-27 23:44:23 -04:30
Juan Basso
c754fb2dcb Updated copyright to 2012. 2012-03-12 22:46:46 -04:00
Juan Basso
3b1bd90ad6 Updated copyright to 2012. 2012-03-12 22:46:07 -04:00
mark_story
0df239de2b Fix some coding standards issues. 2012-03-03 15:59:36 -05:00
ADmad
a31be56f42 Wrapping error string in translator function. 2012-02-26 20:34:30 +05:30
euromark
22452f61f8 type hinting controllers and views 2012-02-25 19:46:06 -05:00
euromark
e94d307ee1 code conventions 2012-02-25 19:46:05 -05:00
Jose Lorenzo Rodriguez
715c848577 Bringing theme code up to date with 2.0, cleaning logic a bit 2012-02-20 17:21:04 -04:30
Jose Lorenzo Rodriguez
02fa1ae60b Fixing a few failing test cases 2012-02-20 16:17:59 -04:30
Jose Lorenzo Rodriguez
ea79ba81a4 Adding a simpler solution to the missing view files problem without altering the built paths in App 2012-02-20 15:39:03 -04:30
Jose Lorenzo Rodriguez
cec9d2e615 Revert "Adding bake skeleton's view directory to view paths list to avoid promlems with existing installation due to file moving done in earlier commit."
This reverts commit 5c792aa831.
2012-02-20 15:21:03 -04:30
Majna
0cd9a93e9e Remove unused variables and statements. 2012-02-17 21:10:43 +01:00
ADmad
5c792aa831 Adding bake skeleton's view directory to view paths list to avoid promlems with existing installation due to file moving done in earlier commit. 2012-02-16 18:15:12 +05:30
Tigran Gabrielyan
7fe6a4d5ea Added Plugin.asset support for HtmlHelper css(), script(), and image() with tests 2012-02-07 20:20:50 -08:00
ADmad
c0690a3eff Added reponse object as property of View class View::$response. Refactored HtmlHelper::media() a bit. 2012-02-06 20:45:00 +05:30
Stefano Zoffoli
edeca2fd3c Fix for extending plugin's view
Signed-off-by: mark_story <mark@mark-story.com>
2012-01-31 21:04:21 -05:00
AD7six
ecbe337052 Make extending a missing element throw an exception
A layout extending a missing layout throws a missing-layout exception
A view extendinga missing view throws a missing-view exception
Now, an element extending a missing element throws a logic exception

in addition "absolute" paths can be used such that (using elements as an
example)

$this->extend('foo') - extends View/Elements/foo.ctp
$this->extend('/foo') - extends View/foo.ctp

Closes #2504
2012-01-25 13:04:45 +01:00
AD7six
11ed1e6ea5 Merge branch '2.1' of github.com:cakephp/cakephp into 2.1 2012-01-24 13:55:56 +01:00
AD7six
def96c0460 throw an exception if the view you try to extend doesn't exist
or element, or layout
2012-01-24 13:54:39 +01:00
Ceeram
95aa7e32c3 include theme in _passedVars array 2012-01-24 10:42:18 +01:00
Jose Diaz-Gonzalez
c2519e702d Merging ThemeView and View class
In 2.1, the ThemeView is merely a small wrapper around View with extra paths set. Merging these two classes means there is one less property for developers to set to enable themes in their applications.
2012-01-22 15:45:26 -05:00
Ceeram
7badb1d252 fix magic __isset() 2012-01-14 12:42:10 -05:00
mark_story
d238d8c0bb Fix incorrect __isset().
There was a missing $ before name.  Fixes issues
with dynamic properties not being handled correctly.

Fixes #2450
2012-01-09 21:47:57 -05:00
mark_story
6c902a19b3 Fix issue with rendering elements inside blocks.
Fixes exceptions being raised when you tried to render
elements inside blocks.  Instead compare the number of open blocks.
This should not change before/after rendering a view.
2011-12-30 14:56:31 -05:00
mark_story
9cdf8042bf Fix issue with scripts_for_layout compatibility. 2011-12-29 11:58:05 -05:00
Ceeram
929a40364f adding magic method__isset() for overloaded properties 2011-12-29 16:22:08 +01:00
Jose Lorenzo Rodriguez
a47c8160dd Merge remote-tracking branch 'origin/2.1' into 2.1 2011-12-28 19:29:48 -04:30
mark_story
0b9b23fe38 Fix caching of paths when a plugin param is used.
Plugin paths should not be cached as it makes subsequent look-ups
behave incorrectly.
2011-12-27 19:24:16 -05:00
mark_story
69b1c33f1f Fix extending in loops. 2011-12-27 19:24:16 -05:00
mark_story
70981d05ca Throw an exception when a view extends itself. 2011-12-27 19:24:15 -05:00
mark_story
047e93e285 Clean up internal API's
- There was some duplication in element() for handing plugins.
- Deprecate options[plugin] for element()
- Add file omitted in previous commit.
2011-12-27 19:24:15 -05:00
Ceeram
d8cbe8a1f7 Cleaning up
- Adding docblock
- Adding visibility keyword
- Update assertion methods.
- Split up tests into smaller methods.
2011-12-27 19:23:52 -05:00
Ceeram
a72ccf28e3 accept dot syntax for element,view and layout filename from plugins fixes #2247 2011-12-27 19:22:21 -05:00
Jose Lorenzo Rodriguez
078a2dfd72 Migrating View and Helpers events to use the CakeEvenManager 2011-12-25 19:00:19 -04:30
mark_story
0607437abd Fix various failing tests. 2011-12-17 23:50:41 -05:00
mark_story
e9779e7126 Fix failing test in Debugger test case. 2011-12-17 22:53:21 -05:00
mark_story
3b57704a27 Update doc blocks. 2011-12-17 22:23:37 -05:00
mark_story
0b0a69de1e Update default layouts to use blocks. 2011-12-17 22:23:37 -05:00
mark_story
f0f3eb9ba9 Fix a few outstanding issues with blocks.
- Blocks left open after rendering files should trigger
  an exception.
- Fix strict errors.
- Correct doc blocks.
2011-12-17 22:23:37 -05:00
mark_story
a8f0eb2b49 Making afterViewFile callbacks able to modify the rendered content
CacheHelper will need this.
2011-12-17 22:23:36 -05:00
mark_story
44a8d7907e Deprecating View::$output.
Replacing it with a magic __get/__set to the content block.
This helps deprecate $content_for_layout as well.
2011-12-17 22:23:36 -05:00
mark_story
c49e261eba Adding new callbacks into View. 2011-12-17 22:23:36 -05:00
mark_story
d8c6594ff6 Adding constants and a property to track the current type.
This helps with resolving parent elements.
2011-12-17 22:23:35 -05:00
mark_story
9b2fd8f251 Extracting ViewBlock from View.
View was getting too fat.
2011-12-17 22:23:35 -05:00
mark_story
e06895ef91 Adding view files for tests.
Adding test case for elements + extending
Making elements extend each other.
2011-12-17 22:23:35 -05:00
mark_story
b6919a0268 Starting the extend() feature.
Adding a simple test case.
Still need to add callbacks around every view fragment rendered.
Without that CacheHelper will not be able to cache extended views
correctly.
2011-12-17 22:23:35 -05:00
mark_story
b866c00318 Renaming methods so they are shorter and still make sense. 2011-12-17 22:23:35 -05:00
mark_story
82139fe8f6 Updating HtmlHelper to allow custom blocks.
Adding tests for blocks.
Adding missing tests.
2011-12-17 22:23:34 -05:00
mark_story
7854f9dd52 Add View::getBlock()
View::get() had two jobs.  That's almost always a bad thing.
Add a new method instead.
2011-12-17 22:23:34 -05:00
Mark Story mark@mark-story.com
90f035c54d Updating block appending to work better. 2011-12-17 22:23:34 -05:00
Mark Story
6d425dfbcb Adding Backwards compatibility for $scripts_for_layout. 2011-12-17 22:23:34 -05:00
Mark Story
bd4ee41e24 Deprecating addScript() its replaced by blocks feature.
Adding View::blocks() for getting the list of blocks.
2011-12-17 22:23:33 -05:00
Mark Story
9107913c07 Implementing basic features of view 'blocks' 2011-12-17 22:23:33 -05:00
Kyle Robinson Young
c836ba08a3 Add/move docblocks to make text available in the API docs 2011-12-08 07:35:02 -08:00
Kyle Robinson Young
8197f87dbc Spelling and grammar fixes 2011-12-01 21:58:09 -08:00
Daniel Luiz Pakuschewski
eb6c07f77e Fixed: _passedArgs now is _passedVars 2011-10-27 10:16:38 -02:00
Daniel Luiz Pakuschewski
24bb6663ab Fixed typo 2011-10-27 10:10:57 -02:00
Ceeram
981f40758c Fixing incorrect theme paths for plugins, tests updated. Fixes #2099 2011-10-13 15:22:10 +02:00
Mark Story
9587892727 Register AppHelper for autoloading
Fixes issues where people with no core helpers loaded would hit fatal
errors.
Fixes #1973
2011-09-07 16:46:59 -04:00
Juan Basso
f5a54d00dd Changed methods and attributes from private to protected. 2011-08-20 00:43:34 -04:00
Juan Basso
d84531d29c Using @property to autocomplete components and helpers in some IDEs. Also added @property to bake of controller and model. Fixes #103. 2011-07-31 20:28:35 -04:00
Juan Basso
9bc3e567c1 Removed the @access and @static. 2011-07-30 20:56:48 -04:00
Juan Basso
02f290ac52 Fixed some API doc in views. 2011-07-28 22:45:47 -04:00
Jose Lorenzo Rodriguez
cfd2d9e00b Updating all @package annotations in doc blocks 2011-07-26 01:46:14 -04:30
mark_story
c2a96267b2 Merge branch 'form-helper' into 2.0 2011-07-02 12:13:41 -04:00
Majna
71ed244f14 Fix for render element - allow under_scored plugin name. Fixes #1814 2011-07-02 02:17:44 +02:00
Mark Story
89258327c6 Moving entity() and its related attributes to Helper
Removing entity() and its attributes from View.
Having that information on View allowed for unwanted side effects,
and seemed like a break of encapsulation.
2011-06-25 20:02:34 -04:00
Mark Story
1ffa7366a5 Removing now dead code. 2011-06-25 19:31:20 -04:00
Mark Story
8a8336c1b0 Starting to convert Helper::setEntity() and View::entity()
to not be nearly as complex and magic.  This also
helps reduce coupling between the helpers and Models.
2011-06-25 19:31:19 -04:00
Juan Basso
1c7d54eacc Updated the paths from comments. 2011-06-19 20:28:40 -04:00
Juan Basso
192812ee7f Updating the copyright to 2011. 2011-05-30 22:32:43 -04:00
ADmad
4c042ae133 Adding proper visibility keywords for class functions 2011-05-29 03:31:34 +05:30
Ceeram
5f97292648 Change case of Controller::$plugin, fixing missing plugin exceptions, tests updated. Also removing no longer needed camelize() calls 2011-05-26 15:31:40 +02:00
Jose Lorenzo Rodriguez
7ba60ff424 Changing more paths 2011-05-13 03:15:04 -04:30
Jose Lorenzo Rodriguez
8746a485bd Search and replace for changed paths 2011-05-13 02:53:35 -04:30
Jose Lorenzo Rodriguez
54eb934892 Fixing plugin related tests in Core package 2011-05-10 00:46:24 -04:30
ADmad
c80a51a163 Splitting View::element() param $params into $data and $options. Removed param $callbacks, use key 'callbacks' in $options array instead. Closes #1646 2011-04-17 07:00:14 +05:30
AD7six
32df3156a7 consolidate cake_error and cake_developer to simply "cake_dev"
it's a lot easier for adding new translations to think:
	is it for the end user?
		use 'cake' as the domain
	is it for the developer
		use 'cake_dev' as the domain
	is it for the console
		use 'cake_console' as the domain

also neatly avoids the "this message is an error, and it's in
cake_developer, why?" - question (because cake_error was intended for
anything which is used in trigger_error/exceptions, not a variable named
$error
2011-03-20 16:38:31 +01:00
AD7six
d2badbeb22 update language domains
no domain - the thing being translated comes from the app - so let the
user handle that
cake - end user
cake_error - error messages
2011-03-19 18:29:31 +01:00
AD7six
28eae99ecb translation changes in the view folder 2011-03-12 20:02:56 +01:00
Jose Lorenzo Rodriguez
ca32143292 Fixing the ControllerTestCase tests 2011-03-09 01:05:58 -04:30
Jose Lorenzo Rodriguez
7b7dabce48 Merge remote-tracking branch 'origin/2.0' into 2.0-class-loading 2011-03-09 00:26:18 -04:30
José Lorenzo Rodríguez
6e4f4efb79 Merge remote branch 'origin/2.0' into 2.0-class-loading
Conflicts:
	cake/bootstrap.php
	lib/Cake/Console/Command/TestSuiteShell.php
	lib/Cake/Console/TaskCollection.php
	lib/Cake/Controller/ComponentCollection.php
	lib/Cake/Controller/Controller.php
	lib/Cake/Core/App.php
	lib/Cake/Model/BehaviorCollection.php
	lib/Cake/Network/CakeRequest.php
	lib/Cake/TestSuite/CakeTestSuiteDispatcher.php
	lib/Cake/TestSuite/CakeWebTestCase.php
	lib/Cake/TestSuite/TestManager.php
	lib/Cake/TestSuite/TestRunner.php
	lib/Cake/View/HelperCollection.php
	lib/Cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php
	lib/Cake/tests/cases/libs/test_manager.test.php
2011-02-13 23:10:19 -04:30
José Lorenzo Rodríguez
aa18cca1c3 Merge remote branch 'origin/2.0' into 2.0-class-loading
Conflicts:
	lib/Cake/View/Helper.php
2011-01-28 01:14:59 -04:30
José Lorenzo Rodríguez
d9c99b5ef6 Merge remote branch 'origin/2.0' into 2.0-class-loading
Conflicts:
	cake/tests/cases/libs/controller_test_case.test.php
	lib/Cake/Controller/ComponentCollection.php
	lib/Cake/Model/ConnectionManager.php
	lib/Cake/TestSuite/Fixture/CakeTestFixture.php
	lib/Cake/View/pages/home.ctp
2011-01-22 01:00:15 -04:30
José Lorenzo Rodríguez
4c0e06c451 Merge remote branch 'origin/2.0' into 2.0-class-loading
Conflicts:
	cake/bootstrap.php
	cake/libs/view/helpers/js.php
	lib/Cake/Model/AclNode.php
	lib/Cake/Model/ConnectionManager.php
	lib/Cake/bootstrap.php
	lib/Cake/tests/cases/libs/controller/controller.test.php
2011-01-02 02:00:03 -04:30
José Lorenzo Rodríguez
151a4bdb33 Fixing view files finding and making tests pass 2010-12-18 22:09:08 -04:30
José Lorenzo Rodríguez
07e43bb0f8 Merge remote branch 'origin/2.0' into 2.0-class-loading
Conflicts:
	cake/libs/view/scaffolds/edit.ctp
	cake/libs/view/scaffolds/form.ctp
	cake/tests/test_app/plugins/test_plugin/views/tests/scaffold.edit.ctp
	cake/tests/test_app/plugins/test_plugin/views/tests/scaffold.form.ctp
	cake/tests/test_app/views/posts/scaffold.edit.ctp
	cake/tests/test_app/views/posts/scaffold.form.ctp
	lib/Cake/Error/ErrorHandler.php
	lib/Cake/Model/Behavior/TranslateBehavior.php
	lib/Cake/Model/Datasource/CakeSession.php
	lib/Cake/Routing/Router.php
	lib/Cake/TestSuite/TestManager.php
	lib/Cake/View/scaffolds/edit.ctp
	lib/Cake/tests/cases/console/shells/bake.test.php
	lib/Cake/tests/cases/libs/cake_log.test.php
	lib/Cake/tests/cases/libs/cake_request.test.php
	lib/Cake/tests/cases/libs/view/helpers/number.test.php
	lib/Cake/tests/test_app/plugins/test_plugin/views/tests/scaffold.edit.ctp
	lib/Cake/tests/test_app/views/posts/scaffold.edit.ctp
2010-12-15 01:13:05 -04:30
José Lorenzo Rodríguez
8e5bd76752 Fixing several errors when running the testsuite 2010-12-11 01:17:55 -04:30
José Lorenzo Rodríguez
3f64844de9 Merge remote branch 'origin/2.0' into 2.0-class-loading
Conflicts:
	lib/Cake/Model/ConnectionManager.php
	lib/Cake/basics.php
2010-12-05 23:43:58 -04:30
José Lorenzo Rodríguez
c542ac20c9 Moving core view to the new folder and allowing the view class to find those views 2010-12-05 13:07:01 -04:30
José Lorenzo Rodríguez
fcd23b0978 Starting to change the class loading for app classes 2010-12-05 10:54:42 -04:30
José Lorenzo Rodríguez
f3eb2159eb Making helpers load 2010-12-04 13:40:24 -04:30
José Lorenzo Rodríguez
be9bcb3627 Moving view clasess to their new home 2010-12-04 13:31:04 -04:30
Renamed from cake/libs/view/view.php (Browse further)