set($data); $this->type = 'taxonomy_term'; } public function set($data) { $data = (array) $data; parent::set($data); if (isset($data['tid'])) { $this->drupalId = $data['tid']; } if (isset($data['type'])) { $this->vocabulary = $data['type']; } } public function apiUri() { if (isset($this->apiUri)) { return $this->apiUri; } elseif (isset($this->uuid)) { return $this->apiBase . 'taxonomy_term/' . $this->uuid; } throw new Exception(); } public function getTitle() { return $this->name; } /** * Type of term: 'category' or 'topic'. * * @return string */ public function getVocabulary() { return $this->vocabulary; } public function getNodeCount() { return $this->node_count; } }