ModelBundle/Repository/StatusRepository.php
public function findNotOutOfWorkflow(array $order = array('name' => 1))
    {
        $qa = $this->createAggregationQuery();
        $qa->match(array('outOfWorkflow' => false));
        $qa->sort($order);

        return $this->hydrateAggregateQuery($qa);
    }
public function findNotOutOfWorkflow(array $order = array('name' => 1))
    {
        $qa = $this->createAggregationQuery();
        $qa->match(array('outOfWorkflow' => false));
        $qa->sort($order);

        return $this->hydrateAggregateQuery($qa);
    }
@parameter array $order

@return array