public function newOrder($order)
    {
        $sorter = new Sorter();
        $sorter->target = $this;
        $sorter->order = $order;
        $sorter->query = (new Query())
                            ->from(static::tableName())
                            ->where(['and',
                                ['!=', 'id', $this->id],
                                ['category_id' => $this->category_id]
                            ])
                            ->orderBy(['sort' => SORT_ASC, 'id' => SORT_ASC])
                            ->indexBy('id');
        return $sorter->run();
    }
public function newOrder($order)
    {
        $sorter = new Sorter();
        $sorter->target = $this;
        $sorter->order = $order;
        $sorter->query = (new Query())
                            ->from(static::tableName())
                            ->where(['and',
                                ['!=', 'id', $this->id],
                                ['category_id' => $this->category_id]
                            ])
                            ->orderBy(['sort' => SORT_ASC, 'id' => SORT_ASC])
                            ->indexBy('id');
        return $sorter->run();
    }
public function newOrder ( $ order ) { $ sorter = new Sorter ( ) ; $ sorter -> target = $ this ; $ sorter -> order = $ order ; $ sorter -> query = ( new Query ( ) ) -> from ( static :: tableName ( ) ) -> where ( [ 'and' , [ '!=' , 'id' , $ this -> id ] , [ 'category_id' => $ this -> category_id ] ] ) -> orderBy ( [ 'sort' => SORT_ASC , 'id' => SORT_ASC ] ) -> indexBy ( 'id' ) ; return $ sorter -> run ( ) ; }
Sets new forums order.
@param int $order new forum sorting order number
@return bool
@since 0.2
Sets new forums order .