I need to access three constants from another file
here are my constants:
class ServiceOrderItemProcess implements LoaderInterface
{
public const STATUS_PICKED_UP = 'soip.pcd';
public const STATUS_DELIVERED = 'soip.dlv';
public const STATUS_RETURNED = 'soip.rtn';
}
in my twig when I try to access them individually like this, it works.
{% if config.to != constant('\\Uello\\Service\\StateMachine\\Loader\\ServiceOrderItemProcess::STATUS_PICKED_UP') %}
But I need to access all the three. Can anyone please help me? I think I need to create an array, but I don't know how do it.
I tried like this:
{% if config.to != [constant('\\Uello\\Service\\StateMachine\\Loader\\ServiceOrderItemProcess::STATUS_PICKED_UP'),
constant('\\Uello\\Service\\StateMachine\\Loader\\ServiceOrderItemProcess::STATUS_RETURNED'),
constant('\\Uello\\Service\\StateMachine\\Loader\\ServiceOrderItemProcess::STATUS_DELIVERED')] %}
It didn't return any error, but it din't access any of the constants either.
Edit: config.to contains all the statuses ("soip.pcd", "soip.pue", "soip.div", "soip.anf", "soip.hld", "soip.itrp", "soip.rfl", "soip.rtn", "soip.dlv", "soip.dmg").
They are all listed as constants in the class ServiceOrderItemProcess. The thing is, I need to access the three I mentioned.