You are here

public function FeedsSource::hasValidConfiguration in Feeds 7.2

Checks whether or not the source configuration is valid.

Return value

bool True if it is valid. False otherwise.

1 call to FeedsSource::hasValidConfiguration()
FeedsSource::existing in includes/FeedsSource.inc
Only return source if configuration is persistent and valid.

File

includes/FeedsSource.inc, line 1035
Definition of FeedsSourceInterface, FeedsState and FeedsSource class.

Class

FeedsSource
Holds the source of a feed to import.

Code

public function hasValidConfiguration() {

  // If there is no feed nid given, there must be no content type specified.
  $standalone = empty($this->feed_nid) && empty($this->importer->config['content_type']);

  // If there is a feed nid given, there must be a content type specified.
  $attached = !empty($this->feed_nid) && !empty($this->importer->config['content_type']);
  if ($standalone || $attached) {
    return TRUE;
  }
  return FALSE;
}