private function reindex($navItemPageId, $placeholderVar, $prevId)
    {
        $index = 0;
        $datas = self::originalFind()->andWhere(['nav_item_page_id' => $navItemPageId, 'placeholder_var' => $placeholderVar, 'prev_id' => $prevId])->orderBy(['sort_index' => SORT_ASC, 'timestamp_create' => SORT_DESC])->all();
        foreach ($datas as $item) {
            Yii::$app->db->createCommand()->update(self::tableName(), ['sort_index' => $index], ['id' => $item->id])->execute();
            ++$index;
        }
    }
private function reindex($navItemPageId, $placeholderVar, $prevId)
    {
        $index = 0;
        $datas = self::originalFind()->andWhere(['nav_item_page_id' => $navItemPageId, 'placeholder_var' => $placeholderVar, 'prev_id' => $prevId])->orderBy(['sort_index' => SORT_ASC, 'timestamp_create' => SORT_DESC])->all();
        foreach ($datas as $item) {
            Yii::$app->db->createCommand()->update(self::tableName(), ['sort_index' => $index], ['id' => $item->id])->execute();
            ++$index;
        }
    }
private function reindex ( $ navItemPageId , $ placeholderVar , $ prevId ) { $ index = 0 ; $ datas = self :: originalFind ( ) -> andWhere ( [ 'nav_item_page_id' => $ navItemPageId , 'placeholder_var' => $ placeholderVar , 'prev_id' => $ prevId ] ) -> orderBy ( [ 'sort_index' => SORT_ASC , 'timestamp_create' => SORT_DESC ] ) -> all ( ) ; foreach ( $ datas as $ item ) { Yii :: $ app -> db -> createCommand ( ) -> update ( self :: tableName ( ) , [ 'sort_index' => $ index ] , [ 'id' => $ item -> id ] ) -> execute ( ) ; ++ $ index ; } }
Reindex the page block items in order to get requestd sorting.

@param unknown $navItemPageId
@param unknown $placeholderVar
@param unknown $prevId
Reindex the page block items in order to get requestd sorting .