src/Gzero/Api/Controller/Admin/ContentController.php
protected function buildSyncData(array $input)
    {
        $syncData = [];
        foreach ($input['data'] as $item) {
            $syncData[$item['id']] = ['weight' => isset($item['weight']) ? $item['weight'] : 0];
        }
        return $syncData;
    }
protected function buildSyncData(array $input)
    {
        $syncData = [];
        foreach ($input['data'] as $item) {
            $syncData[$item['id']] = ['weight' => isset($item['weight']) ? $item['weight'] : 0];
        }
        return $syncData;
    }
protected function buildSyncData ( array $ input ) { $ syncData = [ ] ; foreach ( $ input [ 'data' ] as $ item ) { $ syncData [ $ item [ 'id' ] ] = [ 'weight' => isset ( $ item [ 'weight' ] ) ? $ item [ 'weight' ] : 0 ] ; } return $ syncData ; }
It builds syncData

@param array $input Validated input

@return mixed
It builds syncData