Simple stand-alone script


#1

Hi!

For a previous Pimcore 4 installation we had a couple of simple scripts setup for end users (our client) to be able to interact with some admin data without logging into the admin console. These scripts use custom code and basically just use the data object getters and setters to list and change objects within Pimcore. They utilised the solution of requiring the file pimcore/cli/startup.php.

I’m wondering whether or not it’s possible to do something similar? Otherwise I’ll just have to refactor all code and add it within a new controller or a separate bundle. But since the files/scripts are already there I figured I might ask if it’s possible to do it the old fashioned way, albeit a bit “not by the book”.

Thanks!


#2

Hi there,

sure, it’s still possible, only the source of the startup-file has changed – you now find it here:

pimcore/config/startup_cli.php

Have fun,
Daniel


#3

Awesome. Thanks a lot!


#4

use Symfony Commands for that. Thats what you need.