fork download
  1. <?php
  2.  
  3. function GetSharepointTopSitesTableHeaders(bool $DisplayExpandedWidget=false) : array
  4. {
  5. $return = [
  6. // Name, Sortable
  7. 'Site' => false,
  8. 'Visitors' => 'visitors',
  9. 'Visits' => 'visits',
  10. 'Score' => 'score',
  11. 'Last Updated' => 'last_modified',
  12. ];
  13.  
  14. if ($DisplayExpandedWidget === true) {
  15. $return['Created'] = 'created_at';
  16. }
  17.  
  18. return $return;
  19. }
  20.  
  21. var_dump(GetSharepointTopSitesTableHeaders(true));
Success #stdin #stdout 0.03s 26032KB
stdin
Standard input is empty
stdout
array(6) {
  ["Site"]=>
  bool(false)
  ["Visitors"]=>
  string(8) "visitors"
  ["Visits"]=>
  string(6) "visits"
  ["Score"]=>
  string(5) "score"
  ["Last Updated"]=>
  string(13) "last_modified"
  ["Created"]=>
  string(10) "created_at"
}