Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Hagith
Copy link
Contributor

@Hagith Hagith commented Dec 17, 2011

Allows to easily integrate custom plugin menu item(s) with admin toolbar.
Menu is automaticaly included if plugin class implements getMenu() abstract method.

Example (pimcore.plugin.poll class):

getMenu: function(){
    return new Ext.menu.Item({
        text: t("polls"),
        iconCls: "poll_plugin_menu_icon",
        hideOnClick: false,
        menu: [{
            text: t("create_poll"),
            iconCls: "poll_plugin_menu_new",
            handler: this.openCreateTab
        },{
            text: t("manage_polls"),
            iconCls: "poll_plugin_menu_list",
            handler: this.openListTab
        },{
            text: t("settings"),
            iconCls: "poll_plugin_settings",
            handler: this.openSettingsTab
        }]
    });
}

PS: If this code will be accepted i will update plugin anatomy section in docs.
PS2: I think that this aproach could replace existing option for plugin settings management.

Allows to easily integrate custom plugin menu item(s) with admin toolbar.
Menu is automaticaly included if plugin class implements getMenu() abstract method.
@timglabisch
Copy link

i dont like the name getMenu, there are a lot of different menu's like context menus, the toolbar menu and so on ...

@timglabisch
Copy link

i think i would prefere something like

currentMenu = event.fireAndReceive(event.MODIFY_MENU_CONTEXT, currentMenu);

and a plugin could register on this event like, plugin.dispatchEvent(event.MODIFY_MENU_CONTEXT, function(currentMenu) { return currentMenu } );

@Hagith
Copy link
Contributor Author

Hagith commented Jan 5, 2012

I agree about the method name, getToolbarMenu() or getPimcoreToolbarMenu() would be better.

Current abstract plugin class implementation not using proposed event handling so i think this may introduce a slight confusion to the plugin anatomy.

@timglabisch
Copy link

i think it would be ok to implement it like that for now. if you have a look at other systems there will be a lot of hooks, events and so on. i think next time there will be a lot of "we need this hook" requests for plugins. the abstract interface would grow up and up and up. so we should be very careful implementing such things.

@timglabisch
Copy link

i started to develop an alternative event system based on extJs.
timglabisch@fcb2bb5

pull request will be as soon as possible =)

@Hagith
Copy link
Contributor Author

Hagith commented May 23, 2013

Hi, any progress with this?
Plugins repository is growing and everyone place plugin options in different places in admin menu. There should be a standarized interface for adding plugins to admin menu.

@brusch
Copy link
Member

brusch commented Aug 19, 2013

We are currently in the progress of redesigning the plugin-architecture. We'll of course consider this topic.
Thanks for your valuable input!

@brusch brusch closed this Aug 19, 2013
Hagith added a commit to Hagith/pimcore-boilerplate that referenced this pull request Apr 23, 2014
see pull request: pimcore#4
Hagith added a commit to Hagith/pimcore-boilerplate that referenced this pull request Apr 23, 2014
see pull request: pimcore#4
brusch pushed a commit that referenced this pull request Nov 14, 2016
@elwininc elwininc mentioned this pull request Jan 4, 2018
Apke added a commit to Apke/pimcore that referenced this pull request Feb 5, 2018
Hi,

Maybe a little bit special, but i got an error because of undefined Service for `monolog.logger.pimcore` while Check Requirements Route.

The Exception:
```
request.CRITICAL: Uncaught PHP Exception Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: "You have requested a non-existent service "monolog.logger.pimcore". Did you mean one of these: "monolog.logger.event", "monolog.logger.php", "monolog.logger.request", "monolog.logger.cache", "monolog.logger.console"?" at /var/www/html/client.local/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php line 348 {"exception":"[object] (Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException(code: 0): You have requested a non-existent service \"monolog.logger.pimcore\". Did you mean one of these: \"monolog.logger.event\", \"monolog.logger.php\", \"monolog.logger.request\", \"monolog.logger.cache\", \"monolog.logger.console\"? at /var/www/html/client.local/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php:348)"} []
```

It is caused because of Pimcore\Logger usage of some Methods like `Pimcore\Config::getSystemConfig()`

An Example ExceptionTrace (Working dir is replaced with `./`)
````
#0 ./pimcore/lib/Pimcore/Logger.php(29): Symfony\Component\DependencyInjection\Container->get('monolog.logger....')
#1 ./pimcore/lib/Pimcore/Logger.php(44): Pimcore\Logger::log('Cannot find sys...', 'emergency', Array)
pimcore#2 ./pimcore/lib/Pimcore/Config.php(114): Pimcore\Logger::emergency('Cannot find sys...')
pimcore#3 ./pimcore/lib/Pimcore/Tool/Console.php(80): Pimcore\Config::getSystemConfig()
pimcore#4 ./pimcore/lib/Pimcore/Tool/Console.php(233): Pimcore\Tool\Console::getExecutable('php', true)
pimcore#5 ./pimcore/lib/Pimcore/Tool/Requirements.php(328): Pimcore\Tool\Console::getPhpCli()
pimcore#6 ./pimcore/lib/Pimcore/Bundle/InstallBundle/Controller/InstallController.php(88): Pimcore\Tool\Requirements::checkExternalApplications()
pimcore#7 ./vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php(151): Pimcore\Bundle\InstallBundle\Controller\InstallController->checkAction(Object(Symfony\Component\HttpFoundation\Request), Object(Pimcore\Install\Installer))
pimcore#8 ./vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
pimcore#9 ./vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(202): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
pimcore#10./web/install.php(72): Symfony\Component\HttpKernel\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request))
pimcore#11 {main}
````

best regards
@Cruiser13 Cruiser13 mentioned this pull request Feb 7, 2018
ultramegatom added a commit to ultramegatom/pimcore that referenced this pull request Nov 11, 2022
Example error message:

Warning: Undefined array key "localizedfields"

Es ist eine Ausnahme aufgetreten - der Vorgang konnte nicht durchgeführt werden. Bitte laden Sie die Adminoberfläche neu und versuchen Sie es danach erneut.­Timestamp: Wed Nov 09 2022 16:06:23 GMT+0100 (Mitteleuropäische Normalzeit) Status: 500 | Internal Server Error URL: /admin/object-helper/grid-get-column-config Message: Warning: Undefined array key "localizedfields" Trace: in /var/www/html/vendor/pimcore/pimcore/models/DataObject/Service.php:1263 #0 /var/www/html/vendor/pimcore/pimcore/bundles/AdminBundle/Controller/Admin/DataObject/DataObjectHelperController.php(257): Pimcore\Model\DataObject\Service::getCustomGridFieldDefinitions('subscription', 49356) pimcore#1 /var/www/html/vendor/pimcore/pimcore/bundles/AdminBundle/Controller/Admin/DataObject/DataObjectHelperController.php(225): Pimcore\Bundle\AdminBundle\Controller\Admin\DataObject\DataObjectHelperController->doGetGridColumnConfig(Object(Symfony\Component\HttpFoundation\Request), Object(Pimcore\Config)) pimcore#2 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(153): Pimcore\Bundle\AdminBundle\Controller\Admin\DataObject\DataObjectHelperController->gridGetColumnConfigAction(Object(Symfony\Component\HttpFoundation\Request), Object(Pimcore\Config)) pimcore#3 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(75):

Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) pimcore#4 /var/www/html/vendor/symfony/http-kernel/Kernel.php(202): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) pimcore#5 /var/www/html/public/index.php(40): Symfony\Component\HttpKernel\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request)) pimcore#6 {main}
Corepex pushed a commit that referenced this pull request Nov 16, 2022
Example error message:

Warning: Undefined array key "localizedfields"

Es ist eine Ausnahme aufgetreten - der Vorgang konnte nicht durchgeführt werden. Bitte laden Sie die Adminoberfläche neu und versuchen Sie es danach erneut.­Timestamp: Wed Nov 09 2022 16:06:23 GMT+0100 (Mitteleuropäische Normalzeit) Status: 500 | Internal Server Error URL: /admin/object-helper/grid-get-column-config Message: Warning: Undefined array key "localizedfields" Trace: in /var/www/html/vendor/pimcore/pimcore/models/DataObject/Service.php:1263 #0 /var/www/html/vendor/pimcore/pimcore/bundles/AdminBundle/Controller/Admin/DataObject/DataObjectHelperController.php(257): Pimcore\Model\DataObject\Service::getCustomGridFieldDefinitions('subscription', 49356) #1 /var/www/html/vendor/pimcore/pimcore/bundles/AdminBundle/Controller/Admin/DataObject/DataObjectHelperController.php(225): Pimcore\Bundle\AdminBundle\Controller\Admin\DataObject\DataObjectHelperController->doGetGridColumnConfig(Object(Symfony\Component\HttpFoundation\Request), Object(Pimcore\Config)) #2 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(153): Pimcore\Bundle\AdminBundle\Controller\Admin\DataObject\DataObjectHelperController->gridGetColumnConfigAction(Object(Symfony\Component\HttpFoundation\Request), Object(Pimcore\Config)) #3 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(75):

Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #4 /var/www/html/vendor/symfony/http-kernel/Kernel.php(202): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #5 /var/www/html/public/index.php(40): Symfony\Component\HttpKernel\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #6 {main}
bitbirddev pushed a commit to bitbirddev/pimcore that referenced this pull request Mar 7, 2023
@abdelrhmanyosry abdelrhmanyosry mentioned this pull request Aug 11, 2023
dvesh3 added a commit that referenced this pull request Aug 30, 2023
aryaantony92 pushed a commit that referenced this pull request Aug 30, 2023
pimcore-deployments pushed a commit that referenced this pull request Dec 18, 2023
djbodya added a commit to djbodya/pimcore that referenced this pull request Aug 23, 2025
Can not filter checkbox values in Grid.

Fatal Error
File - vendor/doctrine/dbal/src/Connection.php
Line - 568
Trace - Doctrine\DBAL\Connection::quote(): Argument pimcore#1 ($value) must be of type string, int given, called in vendor/pimcore/pimcore/models/DataObject/ClassDefinition/Data/Checkbox.php on line 174
Trace - #0 vendor/pimcore/pimcore/models/DataObject/ClassDefinition/Data/Checkbox.php(174): Doctrine\DBAL\Connection->quote()
pimcore#1 vendor/pimcore/pimcore/models/DataObject/ClassDefinition/Data/Checkbox.php(158): Pimcore\Model\DataObject\ClassDefinition\Data\Checkbox->getFilterConditionExt()
pimcore#2 vendor/pimcore/admin-ui-classic-bundle/src/Helper/GridHelperService.php(366): Pimcore\Model\DataObject\ClassDefinition\Data\Checkbox->getFilterCondition()
pimcore#3 vendor/pimcore/admin-ui-classic-bundle/src/Helper/GridHelperService.php(667): Pimcore\Bundle\AdminBundle\Helper\GridHelperService->getFilterCondition()
pimcore#4 vendor/pimcore/admin-ui-classic-bundle/src/Controller/Admin/DataObject/DataObjectActionsTrait.php(102): Pimcore\Bundle\AdminBundle\Helper\GridHelperService->prepareListingForGrid()
pimcore#5 vendor/pimcore/admin-ui-classic-bundle/src/Controller/Admin/DataObject/DataObjectController.php(1693): Pimcore\Bundle\AdminBundle\Controller\Admin\DataObject\DataObjectController->gridProxy()
pimcore#6 vendor/symfony/http-kernel/HttpKernel.php(181): Pimcore\Bundle\AdminBundle\Controller\Admin\DataObject\DataObjectController->gridProxyAction()
pimcore#7 vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
pimcore#8 vendor/symfony/http-kernel/Kernel.php(197): Symfony\Component\HttpKernel\HttpKernel->handle()
pimcore#9 vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php(35): Symfony\Component\HttpKernel\Kernel->handle()
pimcore#10 vendor/autoload_runtime.php(29): Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
pimcore#11 public/index.php(19): require_once('...')
pimcore#12 {main}
kingjia90 pushed a commit to djbodya/pimcore that referenced this pull request Aug 26, 2025
Can not filter checkbox values in Grid.

Fatal Error
File - vendor/doctrine/dbal/src/Connection.php
Line - 568
Trace - Doctrine\DBAL\Connection::quote(): Argument pimcore#1 ($value) must be of type string, int given, called in vendor/pimcore/pimcore/models/DataObject/ClassDefinition/Data/Checkbox.php on line 174
Trace - #0 vendor/pimcore/pimcore/models/DataObject/ClassDefinition/Data/Checkbox.php(174): Doctrine\DBAL\Connection->quote()
pimcore#1 vendor/pimcore/pimcore/models/DataObject/ClassDefinition/Data/Checkbox.php(158): Pimcore\Model\DataObject\ClassDefinition\Data\Checkbox->getFilterConditionExt()
pimcore#2 vendor/pimcore/admin-ui-classic-bundle/src/Helper/GridHelperService.php(366): Pimcore\Model\DataObject\ClassDefinition\Data\Checkbox->getFilterCondition()
pimcore#3 vendor/pimcore/admin-ui-classic-bundle/src/Helper/GridHelperService.php(667): Pimcore\Bundle\AdminBundle\Helper\GridHelperService->getFilterCondition()
pimcore#4 vendor/pimcore/admin-ui-classic-bundle/src/Controller/Admin/DataObject/DataObjectActionsTrait.php(102): Pimcore\Bundle\AdminBundle\Helper\GridHelperService->prepareListingForGrid()
pimcore#5 vendor/pimcore/admin-ui-classic-bundle/src/Controller/Admin/DataObject/DataObjectController.php(1693): Pimcore\Bundle\AdminBundle\Controller\Admin\DataObject\DataObjectController->gridProxy()
pimcore#6 vendor/symfony/http-kernel/HttpKernel.php(181): Pimcore\Bundle\AdminBundle\Controller\Admin\DataObject\DataObjectController->gridProxyAction()
pimcore#7 vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
pimcore#8 vendor/symfony/http-kernel/Kernel.php(197): Symfony\Component\HttpKernel\HttpKernel->handle()
pimcore#9 vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php(35): Symfony\Component\HttpKernel\Kernel->handle()
pimcore#10 vendor/autoload_runtime.php(29): Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
pimcore#11 public/index.php(19): require_once('...')
pimcore#12 {main}
kingjia90 pushed a commit that referenced this pull request Aug 26, 2025
Can not filter checkbox values in Grid.

Fatal Error
File - vendor/doctrine/dbal/src/Connection.php
Line - 568
Trace - Doctrine\DBAL\Connection::quote(): Argument #1 ($value) must be of type string, int given, called in vendor/pimcore/pimcore/models/DataObject/ClassDefinition/Data/Checkbox.php on line 174
Trace - #0 vendor/pimcore/pimcore/models/DataObject/ClassDefinition/Data/Checkbox.php(174): Doctrine\DBAL\Connection->quote()
#1 vendor/pimcore/pimcore/models/DataObject/ClassDefinition/Data/Checkbox.php(158): Pimcore\Model\DataObject\ClassDefinition\Data\Checkbox->getFilterConditionExt()
#2 vendor/pimcore/admin-ui-classic-bundle/src/Helper/GridHelperService.php(366): Pimcore\Model\DataObject\ClassDefinition\Data\Checkbox->getFilterCondition()
#3 vendor/pimcore/admin-ui-classic-bundle/src/Helper/GridHelperService.php(667): Pimcore\Bundle\AdminBundle\Helper\GridHelperService->getFilterCondition()
#4 vendor/pimcore/admin-ui-classic-bundle/src/Controller/Admin/DataObject/DataObjectActionsTrait.php(102): Pimcore\Bundle\AdminBundle\Helper\GridHelperService->prepareListingForGrid()
#5 vendor/pimcore/admin-ui-classic-bundle/src/Controller/Admin/DataObject/DataObjectController.php(1693): Pimcore\Bundle\AdminBundle\Controller\Admin\DataObject\DataObjectController->gridProxy()
#6 vendor/symfony/http-kernel/HttpKernel.php(181): Pimcore\Bundle\AdminBundle\Controller\Admin\DataObject\DataObjectController->gridProxyAction()
#7 vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#8 vendor/symfony/http-kernel/Kernel.php(197): Symfony\Component\HttpKernel\HttpKernel->handle()
#9 vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php(35): Symfony\Component\HttpKernel\Kernel->handle()
#10 vendor/autoload_runtime.php(29): Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
#11 public/index.php(19): require_once('...')
#12 {main}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants