[RTM] Hotfix for edit/override all in DCG#1196
[RTM] Hotfix for edit/override all in DCG#1196stefanheimes merged 1 commit intohotfix/2.0.0-alpha18from
Conversation
ad58d46 to
11d740b
Compare
|
@zonky Don´t edit the label of this pull request show in the commit. This isn´t only for uniform time. |
|
na jut |
dmolineus
left a comment
There was a problem hiding this comment.
As this PR provides a new hidden depedency and using MM outside the DCG wouldn't be possible anymore, I disapprove this PR.
| */ | ||
| public function saveItem($objItem) | ||
| { | ||
| $editInformation = $GLOBALS['container']['dc-general.edit-information']; |
There was a problem hiding this comment.
I don't like it at all. We shouldn't add hidden dependencies. The MM or Item interface should provide a way to handle it.
I suggest following. As we are still in alpha, we could break the API without bumping the major version.
public function saveItem($objItem, $setTimestamp = true);Then the DCG data provider could handle it.
After merging this PR it wouldn't be possible to use MM outside of the DCG context!
I'm also not sure if the edit information class is needed at all. The DCG models provide a way for meta data. But let's discuss it in the DCG related PR.
discordier
left a comment
There was a problem hiding this comment.
I'm with @dmolineus on this one.
11d740b to
6c8d36b
Compare
|
@dmolineus @discordier I have remove the hidden dependency |
6c8d36b to
76b9def
Compare
|
This change request modifies interfaces so we have backward compatibility issues here. Probably better to add it only for MM 2.1. Wdyt @discordier? |
|
As there are default values on the interface, any existing concrete class should still work. However should trigger an deprecation notice if not given. |
76b9def to
9d47a24
Compare
| * @throws \RuntimeException When an incompatible item was passed, an Exception is being thrown. | ||
| */ | ||
| public function save(ModelInterface $objItem) | ||
| public function save(ModelInterface $objItem, $timestamp = 0) |
There was a problem hiding this comment.
The tstamp should be passed to $objItem->getItem()->save(); below!
There was a problem hiding this comment.
We also should trigger a
@trigger_error('Not passing a timestamp has been deprecated and will cause an error in MetaModels 3', E_USER_DEPRECATED);There was a problem hiding this comment.
I have taken note of this
| * @throws \RuntimeException When an incompatible item was passed. | ||
| */ | ||
| public function saveEach(CollectionInterface $objItems) | ||
| public function saveEach(CollectionInterface $objItems, $timestamp = 0) |
There was a problem hiding this comment.
We also should trigger a
@trigger_error('Not passing a timestamp has been deprecated and will cause an error in MetaModels 3', E_USER_DEPRECATED);There was a problem hiding this comment.
I have taken note of this
| public function saveEach(CollectionInterface $objItems, $timestamp = 0) | ||
| { | ||
| foreach ($objItems as $objItem) { | ||
| $this->save($objItem); |
There was a problem hiding this comment.
The timestamp should get passed here.
There was a problem hiding this comment.
I have taken note of this
| public function save() | ||
| public function save($timestamp = 0) | ||
| { | ||
| $objMetaModel = $this->getMetaModel(); |
There was a problem hiding this comment.
We also should trigger a
@trigger_error('Not passing a timestamp has been deprecated and will cause an error in MetaModels 3', E_USER_DEPRECATED);There was a problem hiding this comment.
I have taken note of this
| */ | ||
| public function saveItem($objItem) | ||
| public function saveItem($objItem, $timestamp = 0) | ||
| { |
There was a problem hiding this comment.
We also should trigger a
@trigger_error('Not passing a timestamp has been deprecated and will cause an error in MetaModels 3', E_USER_DEPRECATED);There was a problem hiding this comment.
I have taken note of this
66c5211 to
f4628df
Compare
discordier
left a comment
There was a problem hiding this comment.
@baumannsven The deprecation notice of course should only get triggered when $timestamp === null(and therefore has not been passed!
…ction - Input screen condition don´t format the model label if in property selection mode by edit/override all
f4628df to
407166a
Compare
|
@discordier I put the deprecated notification in an if statement and change the default timestamp value from 0 to null |
|
@dmolineus, @stefanheimes could you re-evaluate this PR and either approve or request changes? |
Stable release 2.0.0 In addition to all the changes in the previous betas, this release contains the following fixes and enhancements. Fixes: - MySQL strict mode fixes. - Many language strings are updated. - Language strings for system columns have been moved from attribute_alias to the core (see MetaModels/attribute_alias#22). - Support for responsive image sizes has been added (#1211). - Optimization in backend CSS (see #1174). - Bugfix in file sorting by file name (#1217). - Huge refactorings in all places to finally reduce the complexity of all classes into acceptable ranges. - Fixes for various minor issues and glitches (#1139, #1138) - Add label and description for filter items (#1221) - The URL parameter of filter settings has been moved to the "frontend filter" backend section. - The search in "all languages" checkbox has been restored for searching in translated attributes (#1203, #1204). - The "edit all/override all" button has been disabled for input screens. - Do not override multiple for table "tl_metamodel" (#1223). - The setting "skipfilteroptions" in filter settings now defaults to "off" (PR: #1224, discussion in #1089). Enhancements: - The feature "edit all" and "override all" which has been added to dc-general recently is supported now (#1196, #1098, contao-community-alliance/dc-general#359). - Attribute types are now sorted with first the non-translated ones followed by the translated ones in the attribute edit mask in the type selection widget (#1219). - The minimum versions of all dependencies have been raised to the current stable versions available.
Stable release 2.0.0 In addition to all the changes in the previous betas, this release contains the following fixes and enhancements. Fixes: - MySQL strict mode fixes. - Many language strings are updated. - Language strings for system columns have been moved from attribute_alias to the core (see MetaModels/attribute_alias#22). - Support for responsive image sizes has been added (#1211). - Optimization in backend CSS (see #1174). - Bugfix in file sorting by file name (#1217). - Huge refactorings in all places to finally reduce the complexity of all classes into acceptable ranges. - Fixes for various minor issues and glitches (#1139, #1138) - Add label and description for filter items (#1221) - The URL parameter of filter settings has been moved to the "frontend filter" backend section. - The search in "all languages" checkbox has been restored for searching in translated attributes (#1203, #1204). - The "edit all/override all" button has been disabled for input screens. - Do not override multiple for table "tl_metamodel" (#1223). - The setting "skipfilteroptions" in filter settings now defaults to "off" (PR: #1224, discussion in #1089). Enhancements: - The feature "edit all" and "override all" which has been added to dc-general recently is supported now (#1196, #1098, contao-community-alliance/dc-general#359). - Attribute types are now sorted with first the non-translated ones followed by the translated ones in the attribute edit mask in the type selection widget (#1219). - The minimum versions of all dependencies have been raised to the current stable versions available.
Stable release 2.0.0 In addition to all the changes in the previous betas, this release contains the following fixes and enhancements. Fixes: - MySQL strict mode fixes. - Many language strings are updated. - Language strings for system columns have been moved from attribute_alias to the core (see MetaModels/attribute_alias#22). - Support for responsive image sizes has been added (#1211). - Optimization in backend CSS (see #1174). - Bugfix in file sorting by file name (#1217). - Huge refactorings in all places to finally reduce the complexity of all classes into acceptable ranges. - Fixes for various minor issues and glitches (#1139, #1138) - Add label and description for filter items (#1221) - The URL parameter of filter settings has been moved to the "frontend filter" backend section. - The search in "all languages" checkbox has been restored for searching in translated attributes (#1203, #1204). - The "edit all/override all" button has been disabled for input screens. - Do not override multiple for table "tl_metamodel" (#1223). - The setting "skipfilteroptions" in filter settings now defaults to "off" (PR: #1224, discussion in #1089). Enhancements: - The feature "edit all" and "override all" which has been added to dc-general recently is supported now (#1196, #1098, contao-community-alliance/dc-general#359). - Attribute types are now sorted with first the non-translated ones followed by the translated ones in the attribute edit mask in the type selection widget (#1219). - The minimum versions of all dependencies have been raised to the current stable versions available.
This pull request must merged to if DCG has the feature "uniformTime" override/edit all