public function doGridContainerUpdate($containerUpdateArray = [])
    {
        if (is_array($containerUpdateArray) && !empty($containerUpdateArray)) {
            $queryBuilder = $this->getQueryBuilder();
            $currentContainers = $queryBuilder
                ->select('uid', 'tx_gridelements_children')
                ->from('tt_content')
                ->where(
                    $queryBuilder->expr()->in('uid', implode(',', array_keys($containerUpdateArray)))
                )
                ->execute()
                ->fetchAll();
            if (!empty($currentContainers)) {
                foreach ($currentContainers as $fieldArray) {
                    $fieldArray['tx_gridelements_children'] = (int)$fieldArray['tx_gridelements_children'] + (int)$containerUpdateArray[$fieldArray['uid']];
                    $this->getConnection()->update(
                        'tt_content',
                        $fieldArray,
                        ['uid' => (int)$fieldArray['uid']]
                    );
                    $this->getTceMain()->updateRefIndex('tt_content', (int)$fieldArray['uid']);
                }
            }
        }
    }
public function doGridContainerUpdate($containerUpdateArray = [])
    {
        if (is_array($containerUpdateArray) && !empty($containerUpdateArray)) {
            $queryBuilder = $this->getQueryBuilder();
            $currentContainers = $queryBuilder
                ->select('uid', 'tx_gridelements_children')
                ->from('tt_content')
                ->where(
                    $queryBuilder->expr()->in('uid', implode(',', array_keys($containerUpdateArray)))
                )
                ->execute()
                ->fetchAll();
            if (!empty($currentContainers)) {
                foreach ($currentContainers as $fieldArray) {
                    $fieldArray['tx_gridelements_children'] = (int)$fieldArray['tx_gridelements_children'] + (int)$containerUpdateArray[$fieldArray['uid']];
                    $this->getConnection()->update(
                        'tt_content',
                        $fieldArray,
                        ['uid' => (int)$fieldArray['uid']]
                    );
                    $this->getTceMain()->updateRefIndex('tt_content', (int)$fieldArray['uid']);
                }
            }
        }
    }
public function doGridContainerUpdate ( $ containerUpdateArray = [ ] ) { if ( is_array ( $ containerUpdateArray ) && ! empty ( $ containerUpdateArray ) ) { $ queryBuilder = $ this -> getQueryBuilder ( ) ; $ currentContainers = $ queryBuilder -> select ( 'uid' , 'tx_gridelements_children' ) -> from ( 'tt_content' ) -> where ( $ queryBuilder -> expr ( ) -> in ( 'uid' , implode ( ',' , array_keys ( $ containerUpdateArray ) ) ) ) -> execute ( ) -> fetchAll ( ) ; if ( ! empty ( $ currentContainers ) ) { foreach ( $ currentContainers as $ fieldArray ) { $ fieldArray [ 'tx_gridelements_children' ] = ( int ) $ fieldArray [ 'tx_gridelements_children' ] + ( int ) $ containerUpdateArray [ $ fieldArray [ 'uid' ] ] ; $ this -> getConnection ( ) -> update ( 'tt_content' , $ fieldArray , [ 'uid' => ( int ) $ fieldArray [ 'uid' ] ] ) ; $ this -> getTceMain ( ) -> updateRefIndex ( 'tt_content' , ( int ) $ fieldArray [ 'uid' ] ) ; } } } }
Function to handle record actions between different grid containers

@param array $containerUpdateArray
Function to handle record actions between different grid containers