Neos\Eel\FlowQuery\FlowQuery::pushOperation PHP Method

pushOperation() public method

The last-pushed operation is executed FIRST! (LIFO) Should only be called inside an operation.
public pushOperation ( string $operationName, array $arguments )
$operationName string
$arguments array
    public function pushOperation($operationName, array $arguments)
    {
        array_unshift($this->operations, ['name' => $operationName, 'arguments' => $arguments]);
    }

Usage Example

 /**
  * {@inheritdoc}
  *
  * @param FlowQuery $flowQuery the FlowQuery object
  * @param array $arguments the filter arguments
  * @return void|boolean
  */
 public function evaluate(FlowQuery $flowQuery, array $arguments)
 {
     if (count($arguments) == 0) {
         return count($flowQuery->getContext()) > 0;
     } else {
         $flowQuery->pushOperation('is', []);
         $flowQuery->pushOperation('filter', $arguments);
     }
 }
All Usage Examples Of Neos\Eel\FlowQuery\FlowQuery::pushOperation