You are here

function wsconfig_exists_by_name in Web Service Data 7

Check if a wsconfig exists using a machine name

Parameters

string $name: Machine name to check for

Return value

boolean Returns TRUE if a config exists with that name, FALSE otherwise.

1 string reference to 'wsconfig_exists_by_name'
wsconfig_edit_form in modules/wsconfig/wsconfig.admin.inc
Form callback: create or edit a wsconfig.

File

modules/wsconfig/wsconfig.module, line 506
Main module for wsconfig

Code

function wsconfig_exists_by_name($name) {
  $query = new EntityFieldQuery();
  $query
    ->entityCondition('entity_type', 'wsconfig')
    ->propertyCondition('name', $name)
    ->count();
  $result = $query
    ->execute();
  return $result > 0;
}