You are here

function feed_import_machine_name_exists in Feed Import 7.3

Same name and namespace in other branches
  1. 7.2 feed_import.module \feed_import_machine_name_exists()

Checks if a machine name already exists. Callback for machine_name input type.

Parameters

string $name: Name to check

Return value

bool If machine name exists or not

2 string references to 'feed_import_machine_name_exists'
feed_import_edit_feed_form in ./feed_import.module
Edit feed form
feed_import_import_feed_form in ./feed_import.module
Import form

File

./feed_import.module, line 1117
User interface, cron functions for feed_import module

Code

function feed_import_machine_name_exists($name) {
  $feeds = FeedImport::loadAllFeeds();
  foreach ($feeds as &$feed) {
    if ($feed->machine_name == $name) {
      return TRUE;
    }
  }
  return FALSE;
}