src/Charcoal/Source/AbstractSource.php
protected function parseOrderWithModel(OrderInterface $order)
    {
        if ($this->hasModel()) {
            if ($order->hasProperty()) {
                $model    = $this->model();
                $property = $order->property();
                if (is_string($property) && $model->hasProperty($property)) {
                    $property = $model->property($property);

                    if ($property->l10n()) {
                        $order->setProperty($property->l10nIdent());
                    }
                }
            }

            if ($order instanceof OrderCollectionInterface) {
                $order->traverseOrders(function (OrderInterface $expr) {
                    $this->parseOrderWithModel($expr);
                });
            }
        }

        return $order;
    }
protected function parseOrderWithModel(OrderInterface $order)
    {
        if ($this->hasModel()) {
            if ($order->hasProperty()) {
                $model    = $this->model();
                $property = $order->property();
                if (is_string($property) && $model->hasProperty($property)) {
                    $property = $model->property($property);

                    if ($property->l10n()) {
                        $order->setProperty($property->l10nIdent());
                    }
                }
            }

            if ($order instanceof OrderCollectionInterface) {
                $order->traverseOrders(function (OrderInterface $expr) {
                    $this->parseOrderWithModel($expr);
                });
            }
        }

        return $order;
    }
protected function parseOrderWithModel ( OrderInterface $ order ) { if ( $ this -> hasModel ( ) ) { if ( $ order -> hasProperty ( ) ) { $ model = $ this -> model ( ) ; $ property = $ order -> property ( ) ; if ( is_string ( $ property ) && $ model -> hasProperty ( $ property ) ) { $ property = $ model -> property ( $ property ) ; if ( $ property -> l10n ( ) ) { $ order -> setProperty ( $ property -> l10nIdent ( ) ) ; } } } if ( $ order instanceof OrderCollectionInterface ) { $ order -> traverseOrders ( function ( OrderInterface $ expr ) { $ this -> parseOrderWithModel ( $ expr ) ; } ) ; } } return $ order ; }
Process a query order with the current model.

@param  OrderInterface $order The expression object.
@return OrderInterface The parsed expression object.
Process a query order with the current model .