Skip to content
Snippets Groups Projects
Commit 7ecebc72 authored by Alex Barth's avatar Alex Barth
Browse files

Move FeedsTermElement up to the parser level.

parent ad927e9e
No related branches found
No related tags found
No related merge requests found
...@@ -6,18 +6,6 @@ ...@@ -6,18 +6,6 @@
* Mapper that exposes a node's taxonomy vocabularies as mapping targets. * Mapper that exposes a node's taxonomy vocabularies as mapping targets.
*/ */
/**
* Encapsulates a taxonomy style term object.
*/
class FeedsTermElement extends FeedsElement {
public $tid, $vid;
public function __construct($term) {
parent::__construct($term->name);
$this->tid = $term->tid;
$this->vid = $term->vid;
}
}
/** /**
* Implementation of hook_feeds_parser_sources_alter(). * Implementation of hook_feeds_parser_sources_alter().
*/ */
......
...@@ -133,6 +133,23 @@ class FeedsElement { ...@@ -133,6 +133,23 @@ class FeedsElement {
} }
} }
/**
* Encapsulates a taxonomy style term object.
*/
class FeedsTermElement extends FeedsElement {
public $tid, $vid;
/**
* @param $term
* A stdClass object that is a Drupal taxonomy term.
*/
public function __construct($term) {
parent::__construct($term->name);
$this->tid = $term->tid;
$this->vid = $term->vid;
}
}
/** /**
* Enclosure element, can be part of the result array. * Enclosure element, can be part of the result array.
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment