Commit graph

164 commits

Author SHA1 Message Date
dogmatic69
cf8fccae96 converting $foo == null / $foo == false to !$foo 2012-09-14 18:26:30 +01:00
Kyle Robinson Young
bc40ac7d3f Remove unused variables and code 2012-09-05 17:19:13 -07:00
mark_story
571c8bc08c Merge branch 'master' into 2.3
Conflicts:
	lib/Cake/Console/Command/Task/TestTask.php
2012-09-01 13:51:40 +01:00
mark_story
728300786b Merge branch 'master' into 2.3 2012-08-30 19:43:11 +01:00
Kyle Robinson Young
ee9a545c7d Correct docblock see tags to ViewBlock
Fixes http://cakephp.lighthouseapp.com/projects/43067/tickets/97-about-api-description-of-viewassign
2012-08-29 21:53:29 -07:00
Paul Redmond
a993a7a50d Fixing typo in view property during unset() 2012-08-24 23:11:25 -07:00
Florian Krämer
83903cd5b4 Changing the signature of View::_elementCache() 2012-07-06 02:13:34 +02:00
Florian Krämer
b2bb7bf2ae Fixing a few issues within the new methods 2012-07-06 00:22:39 +02:00
Florian Krämer
ca9ff0283c Refactoring View::element() 2012-07-04 11:48:10 +02:00
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