public function getValue()
    {
        $terms = $this->base['value'];

        if (is_array($terms)) {
            $ret = array();

            foreach ($terms as $t) {
                $ret[] = $this->termFactory->create($t, $this->taxonomy());
            }

            return $ret;
        } elseif (is_object($terms)) {
            return $this->termFactory->create($terms, $this->taxonomy());
        } else {
            if ($this->base['multiple'] || $this->base['field_type'] === 'multi_select' || $this->base['field_type'] === 'checkbox') {
                return array();
            } else {
                return null;
            }
        }
    }
public function getValue()
    {
        $terms = $this->base['value'];

        if (is_array($terms)) {
            $ret = array();

            foreach ($terms as $t) {
                $ret[] = $this->termFactory->create($t, $this->taxonomy());
            }

            return $ret;
        } elseif (is_object($terms)) {
            return $this->termFactory->create($terms, $this->taxonomy());
        } else {
            if ($this->base['multiple'] || $this->base['field_type'] === 'multi_select' || $this->base['field_type'] === 'checkbox') {
                return array();
            } else {
                return null;
            }
        }
    }
public function getValue ( ) { $ terms = $ this -> base [ 'value' ] ; if ( is_array ( $ terms ) ) { $ ret = array ( ) ; foreach ( $ terms as $ t ) { $ ret [ ] = $ this -> termFactory -> create ( $ t , $ this -> taxonomy ( ) ) ; } return $ ret ; } elseif ( is_object ( $ terms ) ) { return $ this -> termFactory -> create ( $ terms , $ this -> taxonomy ( ) ) ; } else { if ( $ this -> base [ 'multiple' ] || $ this -> base [ 'field_type' ] === 'multi_select' || $ this -> base [ 'field_type' ] === 'checkbox' ) { return array ( ) ; } else { return null ; } } }
Get Term or array of Terms.

@return \Tev\Term\Model\Term|\Tev\Term\Model\Term[]|null
Get Term or array of Terms .