Skip to content

Commit

Permalink
fixed #12 - Comma missing in panel.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Fasching committed Dec 30, 2019
1 parent 1690eff commit 469cfe2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ pimcore.plugin.alternateObjectTrees.config.panel = Class.create({
}

Ext.Ajax.request({
url: "/admin/elements-alternate-object-trees/admin/alternate-object-tree",
method: "POST"
url: "/admin/elements-alternate-object-trees/alternate-object-tree",
method: "POST",
params: {
name: value
},
Expand Down
12 changes: 7 additions & 5 deletions src/Elements/Bundle/AlternateObjectTreesBundle/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,14 @@ public function getTreeId() {
*/
public function getLevelDefinitionByLevel($level)
{
$levelDefinition = $this->levelDefinitions[$level - 1];
$class = $this->getClass();
if ($levelDefinition && $class) {
$levelDefinitionClass = 'Elements\\Bundle\\AlternateObjectTreesBundle\\LevelDefinition\\'.ucfirst($levelDefinition['type']);
if(array_key_exists($level - 1, $this->levelDefinitions)) {
$levelDefinition = $this->levelDefinitions[$level - 1];
$class = $this->getClass();
if ($levelDefinition && $class) {
$levelDefinitionClass = 'Elements\\Bundle\\AlternateObjectTreesBundle\\LevelDefinition\\' . ucfirst($levelDefinition['type']);

return new $levelDefinitionClass($class, $levelDefinition['config']);
return new $levelDefinitionClass($class, $levelDefinition['config']);
}
}

return null;
Expand Down

0 comments on commit 469cfe2

Please sign in to comment.