Skip to content

Access config in custom Conditions #217

Closed Answered by sebastianfeldmann
Wirone asked this question in Q&A
Discussion options

You must be logged in to vote

I just released version 5.17.2 with both new Conditions.

"action": "some-action"
  "conditions": [
    {"exec": "\\CaptainHook\\App\\Hook\\Condition\\Config\\CustomValueIsTruthy",
     "args": [
       "NAME_OF_CUSTOM_VALUE"
    ]}
  ]
"action": "some-action"
  "conditions": [
    {"exec": "\\CaptainHook\\App\\Hook\\Condition\\Config\\CustomValueIsFalsy",
     "args": [
       "NAME_OF_CUSTOM_VALUE"
    ]}
  ]

You can now build your own by implementing the CaptainHook\App\Hook\Condition\ConfigDependant interface.

Hope it helps :)

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@Wirone
Comment options

Comment options

You must be logged in to vote
2 replies
@Wirone
Comment options

@sebastianfeldmann
Comment options

Comment options

You must be logged in to vote
1 reply
@Wirone
Comment options

Answer selected by sebastianfeldmann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants