Skip to content

Commit

Permalink
Merge pull request #399 from w-vision/dkarlovi-patch-2
Browse files Browse the repository at this point in the history
fix: Pimcore 11 compat
  • Loading branch information
dpfaffenbauer committed Oct 4, 2023
2 parents a6a33ce + 7e55cbd commit 1a9e788
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/DataDefinitionsBundle/Fetcher/ObjectsFetcher.php
Expand Up @@ -17,8 +17,8 @@
namespace Wvision\Bundle\DataDefinitionsBundle\Fetcher;

use InvalidArgumentException;
use Pimcore\Model\DataObject\AbstractObject;
use Pimcore\Model\DataObject\ClassDefinition;
use Pimcore\Model\DataObject\Concrete;
use Pimcore\Model\DataObject\Listing;
use Wvision\Bundle\DataDefinitionsBundle\Context\FetcherContextInterface;
use Wvision\Bundle\DataDefinitionsBundle\Model\ExportDefinitionInterface;
Expand Down Expand Up @@ -60,12 +60,12 @@ private function getClassListing(ExportDefinitionInterface $definition, array $p
$rootNode = null;
$conditionFilters = [];
if (isset($params['root'])) {
$rootNode = Concrete::getById($params['root']);
$rootNode = AbstractObject::getById($params['root']);

if (null !== $rootNode) {
$quotedPath = $list->quote($rootNode->getRealFullPath());
$quotedWildcardPath = $list->quote(str_replace('//', '/', $rootNode->getRealFullPath().'/').'%');
$conditionFilters[] = '(o_path = '.$quotedPath.' OR o_path LIKE '.$quotedWildcardPath.')';
$conditionFilters[] = '(path = '.$quotedPath.' OR path LIKE '.$quotedWildcardPath.')';
}
}

Expand All @@ -79,7 +79,7 @@ private function getClassListing(ExportDefinitionInterface $definition, array $p
}

if (isset($params['only_direct_children']) && $params['only_direct_children'] == 'true' && null !== $rootNode) {
$conditionFilters[] = 'o_parentId = '.$rootNode->getId();
$conditionFilters[] = 'parentId = '.$rootNode->getId();
}

if (isset($params['condition'])) {
Expand Down
Expand Up @@ -9,6 +9,7 @@ document.addEventListener(pimcore.events.prepareObjectTreeContextMenu, function
}

const tree = event.detail.menu;
const item = event.detail.object;

Ext.create('Ext.data.Store', {
model: 'Executable',
Expand Down Expand Up @@ -36,13 +37,13 @@ document.addEventListener(pimcore.events.prepareObjectTreeContextMenu, function
exportMenu.push({
text: executable.get('name'),
iconCls: "pimcore_icon_object pimcore_icon_overlay_add",
handler: function (menuItem) {
handler: function () {
Ext.Ajax.request({
url: '/admin/process_manager/executables/run',
params: {
id: executable.id,
startupConfig: Ext.encode({
root: menuItem.$iid,
root: item.get('id'),
}),
csrfToken: pimcore.settings['csrfToken']
},
Expand Down
Expand Up @@ -90,7 +90,6 @@ pimcore.object.search = Class.create(pimcore.object.search, {
root: this.object.id,
query: this.searchField.getValue(),
only_direct_children: this.checkboxOnlyDirectChildren.getValue(),
condition: this.sqlEditor.getValue(),
ids: ids,
}),
csrfToken: pimcore.settings['csrfToken']
Expand Down

0 comments on commit 1a9e788

Please sign in to comment.