You are here

function drush_wsdata_list in Web Service Data 7

Get a list of all wsdata configs.

File

./wsdata.drush.inc, line 116
Drush implementation for the wsconfig module.

Code

function drush_wsdata_list() {
  $wsconfigs = entity_load('wsconfig', FALSE);
  $rows[] = array(
    dt('Name'),
    dt('Machine Name'),
    dt('Type'),
    dt('Method Type'),
    dt('Method'),
  );
  foreach ($wsconfigs as $wsconfig) {
    $row = array(
      $wsconfig->title,
      $wsconfig->name,
      $wsconfig->type,
    );
    foreach ($wsconfig
      ->getOperations() as $method) {
      $rows[] = array_merge($row, array(
        $method,
        $wsconfig->data[$wsconfig
          ->getMethodKey($method)],
      ));
    }
  }
  drush_print_table($rows, TRUE);
}