eZ Community » Forums » eZ Publish 5 Platform » Setting Siteaccess in CommandLine Script
expandshrink

Setting Siteaccess in CommandLine Script

Setting Siteaccess in CommandLine Script

Wednesday 21 January 2015 12:00:03 pm - 2 replies

Hello,

currently i am wondering if it is possible to set the currently used siteaccess inside! a command line script. I am using one script for more than one siteaccess. The script processes some jobs and each job can be related to another siteaccess, so i have to set the currently used siteaccess with php.

I can not use the --siteaccess parameter for calling this script.

 

Best regards,

Jacob

 

Edit:

it seems like my question could be answer with the configresolver->setSiteaccess() Method. I will try that.

Edit2:

It seems that setSiteaccess is undefined in eZPublish 5.2 EE

Modified on Wednesday 21 January 2015 12:16:24 pm by Jacob Ester

Wednesday 21 January 2015 2:29:08 pm

Hi

Why can't you use --siteaccess parameter ?

Anyway, you can do what is done by preview and dispatch ezpublish.config.scope_change event (MVCEvents::CONFIG_SCOPE_CHANGE). See example in ContentPreviewHelper.

Thursday 22 January 2015 10:44:43 am

Hi Jérome,

 

my command-line script processes x jobs successively. Each job could have another siteaccess. So i have to set the current siteaccess if i want to make use of the config resolver eg.

Thank you for your hint, i will try this.

Best regards,

Jacob

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from