I have been toying with integrating node_limitnumber with rules, but I have run into a minor problem.

I am working on creating a special condition that needs to know the settings of the other conditions in the rule. Basically the condition I want to create is going to limit creation of nodes. This condition only takes a numerical argument, but it would need to reference other conditions if they are available. For example it would need to know which node types this is applicable for.

I realize that the information is in the database and with some effort could be recalled, but I just wanted to know if there was some already provided method for using the variables of one condition inside of another condition. If this isn't possible I am open to any suggestions.

Comments

jdwfly’s picture

Hmm, after reading through the documentation again I belive I may have found my answer.

On http://drupal.org/node/298534 I found this...

There are also two additional parameters passed to every action: $element, the whole configured element (condition/action) and $state, the rules evaluation state. However only advanced actions need to make use of this and usually one can silently ignore them.

It looks like $element may have the necessary information for me if a condition is also passed $element.

jdwfly’s picture

This isn't going to fulfill my expectations. The $element variable has the current condition/action in it and not all of the conditions/actions for the rule.

jdwfly’s picture

Status: Active » Closed (fixed)

This is no longer necessary, I figured out how to do this without needing to do what I first asked.

mitchell’s picture

Component: Provided module integration » Provided Module Integrations

Updated component.