42 Commits

Author SHA1 Message Date
Samuel Georges
b9581332aa Save relations first in model saver
This aligns better with the relation principal "parent saves child" / "child cannot save parent" and is more conducive to the natural workflow of a coder, ie

// Relation first
$gallery = new Gallery;
$gallery->save();

// Primary model last
$post = new Post;
$post->gallery = $gallery;
$post->save();

Refs https://github.com/octobercms/library/pull/277
2017-12-06 21:21:19 +11:00
Samuel Georges
c0aa03a400 Create an error making trait
Widgets can throw fatal errors too
2017-06-11 22:38:03 +10:00
Samuel Georges
a2a7eec4f5 Rename methods in CollapsableWidget
The methods were far too generic. When a trait or behavior is used, it's usually a good include to include the name of the trait in the methods and properties it provides. This reduces the chance of a conflict with the implementing class.
2017-06-10 15:42:24 +10:00
Samuel Georges
f020479b91 Move session logic to SessionMaker
This allows controller behaviors to access session utils
2017-06-10 04:58:29 +10:00
Quezler
cc17b679f1 Code dusting (#2826)
Code cleaning according to PSR-2 w/ exemptions (mostly dust).
2017-04-24 21:38:19 +10:00
Samuel Georges
ec18697ae2 Cannot use Cms\Classes\Controller as Controller because the name is already in use
Remove test code
2017-03-14 19:42:37 +11:00
Samuel Georges
e54cf7133b Improve some inline docs in preparation for API docs 2017-03-14 19:36:17 +11:00
Samuel Georges
3365aee129 Halcyon models don't support relations
Use a simple fill() approach instead of trying to set nested fields via their relations
Refs https://github.com/rainlab/translate-plugin/issues/216
2017-02-03 06:00:52 +11:00
Samuel Georges
50d3ffb035 Halycon models do not declare forceFill
Only bind purgeable fallback event once (only needed once)
Refs https://github.com/rainlab/translate-plugin/issues/54#issuecomment-256067096
2016-11-05 10:59:53 +11:00
Samuel Georges
f74d95392f Fix instances where defineProperties returns nothing
addPurgeableAttribute -> addPurgeable
2016-10-19 07:21:09 +11:00
Samuel Georges
a449c05809 FormModelSaver now purges fields beginning with underscore
This is to align with the native model's fill() behavior, of which this classes' behavior is derived.
Fixes #2422
2016-10-18 08:57:57 +11:00
Samuel Georges
9b5851fbd5 Improves exception handling for invalid model resolver
A more specific error message is now shown when trying to resolve a model from an invalid source (eg: an array)
Fixes #2354
2016-09-18 13:44:13 +10:00
Samuel Georges
c7724f7c90 Minor rollback
Not all widget base classes will allow arg 1 from being omitted, specifically Report Widgets that define drop down options
Fixes #2229
2016-07-23 11:17:58 +10:00
Samuel Georges
a180e37b1d Maintain key integrity. Fixes #1969 2016-05-04 19:20:41 +10:00
Samuel Georges
ba57dd8993 clearAssetDefinitions -> flushAssets 2016-04-12 18:04:15 +10:00
Pásztor Gábor
9f3fcf27ed Update AssetsList 2016-03-30 18:17:18 +02:00
Pásztor Gábor
324875f768 Clean up 2016-03-28 15:47:29 +02:00
Samuel Georges
23f4d40ef2 Merge common functionality in to FormModelWidget 2016-03-25 18:01:58 +11:00
Samuel Georges
808c8f0ca4 Minor tidy and rollback from #1720 2016-02-13 14:41:17 +11:00
Joshua Wilson
6f3d7a58f2 Phpdoc cleanup for System\Traits
removed in WidgetMaker trait

phpdoc cleanup of backend traits and classes

Minor fix for cases when file is not found
2016-02-13 14:06:50 +11:00
alekseybobkov
8cb5ec1c0e Fixed several minor bugs in Inspector. 2016-01-29 22:16:33 -08:00
Samuel Georges
fc04bd1b4c Added new makeFormWidget() method to WidgetMaker for rendering form widgets individually 2015-08-07 19:06:04 +10:00
Samuel Georges
398177b006 Full pivot support added to RelationController 2015-03-19 20:01:08 +11:00
Samuel Georges
a8389fb1aa Tooltip now auto initializes
initForm can now pass context
Various improvements and bug fixes
2015-03-12 20:50:16 +11:00
Samuel Georges
b1b700368f Radical reorg of some classes 2015-01-28 11:49:54 +11:00
Samuel Georges
dc6098c089 Create unit tests for WidgetMaker trait 2015-01-05 13:22:40 +11:00
Samuel Georges
f4487076b7 Remove some legacy code, no need to pipe WidgetMaker thru WidgetManager 2015-01-05 13:12:48 +11:00
Sam Georges
c32ba4cbad Minor code clean 2014-11-04 17:41:48 +11:00
Stefan Talen
61cf1ad710 Merge branch 'develop' of https://github.com/octobercms/october into feature/PSR-2
Conflicts:
	modules/backend/behaviors/FormController.php
	modules/backend/classes/AuthManager.php
	modules/backend/lang/fa/lang.php
	modules/backend/widgets/Form.php
	modules/cms/classes/CmsCompoundObject.php
	modules/cms/classes/ComponentHelpers.php
	modules/cms/formwidgets/Components.php
2014-10-11 11:58:20 +02:00
Sam Georges
4504d5bf4c Improve translation handling 2014-10-11 10:37:48 +11:00
Stefan Talen
aa68d163a0 Updating modules/backend/traits 2014-10-11 00:07:30 +02:00
Sam Georges
fbf5cbbb67 Moved ViewMaker trait to live under system, it can be useful for Models too. 2014-09-29 12:19:19 +10:00
Sam Georges
7bc9f0029a Simplify code using class_uses_recursive helper 2014-09-29 12:15:44 +10:00
alekseybobkov
a77b290a8e Improvements in the back-end widgets 2014-09-18 20:34:24 -07:00
Sam Georges
efbb0351db ViewMaker now uses PathMaker 2014-09-13 15:02:52 +10:00
Sam Georges
bfc3804a1a If a base classes uses a trait, no need to reuse that trait because Model boots all traits now 2014-08-03 11:57:51 +10:00
Sam Georges
1f64ccf792 Traits use private instead of protected so they can be used/reused in base classes 2014-08-03 10:04:06 +10:00
alekseybobkov
fecfeee2ac Fixed drop-down widget properties on the dashboard 2014-08-02 12:29:41 +11:00
Sam Georges
200615f310 CMS Render partial now supports not throwing an exception.
Components without default partials do not throw errors when used on the page, they simply fail gracefully.
2014-07-29 13:52:01 +10:00
Sam Georges
2f90b80421 ViewMaker can now check for layouts and partials without throwing an error 2014-06-20 21:36:27 +10:00
Sam Georges
d808409099 Fixes issue where sort order is lost on inspector dropdown field types 2014-05-29 18:22:48 +10:00
Sam Georges
71a5dd67ab Welcome to the world, October :-) 2014-05-14 23:24:20 +10:00