55 Commits

Author SHA1 Message Date
jacobdekeizer
3450921c26
Fix docbocks ListController behaviour. (#4989)
* Fix docbocks ListController behaviour.
2020-03-23 20:12:49 +11:00
Samuel Georges
b22021db3b Minor continuity change
Let's save this for L6 upgrade. Although PHP 7 partially support this, we should revisit once the PHP version is bumped + better support for it
2019-12-07 11:37:06 +11:00
Ben Thomson
c3d99b2acf
Remove void return types in PreferenceMaker
Maintains PHP 7.0 compatibility. Will likely be re-added once rebased to Laravel 6.

Fixes #4659.
2019-10-03 22:07:37 +08:00
Ben Thomson
a59d3b83eb Code quality clean up (#4449)
Credit to @bennothommo
2019-07-18 08:50:37 -06:00
Luke Towers
c04b7faecc
Translate Inspector option titles 2019-07-12 09:42:22 -06:00
Ben Thomson
6d283829c0
Store limited list widget configuration in user preferences (#4360)
Provides a new method of storing the list page count and visible column configs that survives a user logging out then logging back in to October. In addition, the users are provided with a "Reset to Default" button in the config modal allowing them to use the default list config if preferred.
2019-06-08 11:28:08 +08:00
Luke Towers
07aa790fc0 Typo fix 2019-04-19 15:26:10 -06:00
Tschallacka
6d3e751a38 Added hasFatalError() and getFatalError() (#3904)
Credit to @tschallacka
2019-04-19 15:24:21 -06:00
SeriousKen
9d8416e178 Added morphTo to list of singular relations (#3809)
Credit to @SeriousKen. Fixes #3807
2018-12-06 10:43:50 -06:00
Nathan van der Werf
0f0d108da0
Remove unused imports 2018-08-24 19:51:59 +02:00
Nathan van der Werf
66fa03f17e
Revert "Remove unused imports"
This reverts commit 742a5f415bc45819b11c77402efc114fa2f4451e.
2018-08-24 19:40:40 +02:00
Nathan van der Werf
62c59a4903 Refactor ternary operators to null coalescing operators 2018-08-15 19:15:13 +02:00
Nathan van der Werf
742a5f415b Remove unused imports 2018-08-15 18:27:36 +02:00
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