original_string: public function getUrlsForSocial($idSite, $period, $date, $segment = false, $idSubtable = false)
      {
          Piwik::checkUserHasViewAccess($idSite);
  
          $dataTable = $this->getDataTable(Archiver::SOCIAL_NETWORKS_RECORD_NAME, $idSite, $period, $date, $segment, $expanded = true, $idSubtable);
  
          if (!$idSubtable) {
              $dataTable = $dataTable->mergeSubtables();
          }
  
          $dataTable = $this->combineDataTables($dataTable, function() use ($idSite, $period, $date, $segment, $idSubtable) {
              $dataTableFiltered = $this->getDataTable(Archiver::WEBSITES_RECORD_NAME, $idSite, $period, $date, $segment, $expanded = true);
  
              $socialNetworks = array_values(Social::getInstance()->getDefinitions());
              $social = isset($socialNetworks[$idSubtable - 1]) ? $socialNetworks[$idSubtable - 1] : false;
  
              // filter out everything but social network indicated by $idSubtable
              $dataTableFiltered->filter(
                  'ColumnCallbackDeleteRow',
                  array('label',
                      function ($url) use ($social) {
                          return !Social::getInstance()->isSocialUrl($url, $social);
                      }
                  )
              );
  
              return $dataTableFiltered->mergeSubtables();
          });
  
          $dataTable->filter('AddSegmentByLabel', array('referrerUrl'));
          $dataTable->filter('Piwik\Plugins\Referrers\DataTable\Filter\UrlsForSocial', array(true));
          $dataTable->queueFilter('ReplaceColumnNames');
          return $dataTable;
      }
code: public function getUrlsForSocial($idSite, $period, $date, $segment = false, $idSubtable = false)
      {
          Piwik::checkUserHasViewAccess($idSite);
  
          $dataTable = $this->getDataTable(Archiver::SOCIAL_NETWORKS_RECORD_NAME, $idSite, $period, $date, $segment, $expanded = true, $idSubtable);
  
          if (!$idSubtable) {
              $dataTable = $dataTable->mergeSubtables();
          }
  
          $dataTable = $this->combineDataTables($dataTable, function() use ($idSite, $period, $date, $segment, $idSubtable) {
              $dataTableFiltered = $this->getDataTable(Archiver::WEBSITES_RECORD_NAME, $idSite, $period, $date, $segment, $expanded = true);
  
              $socialNetworks = array_values(Social::getInstance()->getDefinitions());
              $social = isset($socialNetworks[$idSubtable - 1]) ? $socialNetworks[$idSubtable - 1] : false;
  
              // filter out everything but social network indicated by $idSubtable
              $dataTableFiltered->filter(
                  'ColumnCallbackDeleteRow',
                  array('label',
                      function ($url) use ($social) {
                          return !Social::getInstance()->isSocialUrl($url, $social);
                      }
                  )
              );
  
              return $dataTableFiltered->mergeSubtables();
          });
  
          $dataTable->filter('AddSegmentByLabel', array('referrerUrl'));
          $dataTable->filter('Piwik\Plugins\Referrers\DataTable\Filter\UrlsForSocial', array(true));
          $dataTable->queueFilter('ReplaceColumnNames');
          return $dataTable;
      }
code_tokens: public function getUrlsForSocial ( $ idSite , $ period , $ date , $ segment = false , $ idSubtable = false ) { Piwik :: checkUserHasViewAccess ( $ idSite ) ; $ dataTable = $ this -> getDataTable ( Archiver :: SOCIAL_NETWORKS_RECORD_NAME , $ idSite , $ period , $ date , $ segment , $ expanded = true , $ idSubtable ) ; if ( ! $ idSubtable ) { $ dataTable = $ dataTable -> mergeSubtables ( ) ; } $ dataTable = $ this -> combineDataTables ( $ dataTable , function ( ) use ( $ idSite , $ period , $ date , $ segment , $ idSubtable ) { $ dataTableFiltered = $ this -> getDataTable ( Archiver :: WEBSITES_RECORD_NAME , $ idSite , $ period , $ date , $ segment , $ expanded = true ) ; $ socialNetworks = array_values ( Social :: getInstance ( ) -> getDefinitions ( ) ) ; $ social = isset ( $ socialNetworks [ $ idSubtable - 1 ] ) ? $ socialNetworks [ $ idSubtable - 1 ] : false ; // filter out everything but social network indicated by $idSubtable $ dataTableFiltered -> filter ( 'ColumnCallbackDeleteRow' , array ( 'label' , function ( $ url ) use ( $ social ) { return ! Social :: getInstance ( ) -> isSocialUrl ( $ url , $ social ) ; } ) ) ; return $ dataTableFiltered -> mergeSubtables ( ) ; } ) ; $ dataTable -> filter ( 'AddSegmentByLabel' , array ( 'referrerUrl' ) ) ; $ dataTable -> filter ( 'Piwik\Plugins\Referrers\DataTable\Filter\UrlsForSocial' , array ( true ) ) ; $ dataTable -> queueFilter ( 'ReplaceColumnNames' ) ; return $ dataTable ; }
docstring: Returns report containing individual referrer URLs for a specific social networking
  site.
  
  @param string $idSite
  @param string $period
  @param string $date
  @param bool|string $segment
  @param bool|int $idSubtable This ID does not reference a real DataTable record. Instead, it
  is the array index of an item in the Socials list file.
  The urls are filtered by the social network at this index.
  If false, no filtering is done and every social URL is returned.
  @return DataTable
docstring_tokens: Returns report containing individual referrer URLs for a specific social networking site .