Comments

omissis’s picture

omissis’s picture

Title: Content is promoted » Implement "Content is promoted" Condition

Look at the Drupal\node\Plugin\Condition\NodeType class (a core condition) and Drupal\condition\Tests\Condition\NodeConditionTest.

Compared to the core NodeType condition, we do not use configuration or configuration forms yet, but specify all parameters as context for now, as the form stuff is still to be figured out.

fago’s picture

Title: Implement "Content is promoted" Condition » Port "Content is promoted" condition to 8.x

improving title

omissis’s picture

Status: Active » Needs review
omissis’s picture

Assigned: omissis » Unassigned
fago’s picture

Status: Needs review » Needs work

Thanks. Setting to needs work as you are still working on the tests.

paranojik’s picture

Status: Needs work » Needs review

I went with a simpler implementation following the example of other conditions: https://github.com/fago/rules/pull/29. Happy to go with the way @omissis did it, I just need to understand the difference - which way thing are done best.

fubhy’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.