public function __construct($paramarray = array())
{
// Defaults
$this->fields = array_merge(self::default_fields(), $this->fields);
if (is_string($paramarray)) {
$paramarray = array('term_display' => $paramarray, 'term' => Utils::slugify($paramarray));
}
parent::__construct($paramarray);
// TODO does term need to be a slug ?
// TODO How should we handle neither being present ?
// A Vocabulary may be used for organization, display, or both.
// Therefore, a Term can be constructed with a term, term_display, or both
if ($this->term == '') {
$this->fields['term'] = Utils::slugify($this->fields['term_display']);
}
$this->exclude_fields('id');
}