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

        if (is_array($val)) {
            if (isset($val['ID'])) {
                return $this->authorFactory->create($val['ID']);
            } else {
                $authors = array();

                foreach ($val as $a) {
                    $authors[] = $this->authorFactory->create($a['ID']);
                }

                return $authors;
            }
        } else {
            if (isset($this->base['multiple']) && $this->base['multiple']) {
                return array();
            } else {
                return null;
            }
        }
    }
public function getValue()
    {
        $val = $this->base['value'];

        if (is_array($val)) {
            if (isset($val['ID'])) {
                return $this->authorFactory->create($val['ID']);
            } else {
                $authors = array();

                foreach ($val as $a) {
                    $authors[] = $this->authorFactory->create($a['ID']);
                }

                return $authors;
            }
        } else {
            if (isset($this->base['multiple']) && $this->base['multiple']) {
                return array();
            } else {
                return null;
            }
        }
    }
public function getValue ( ) { $ val = $ this -> base [ 'value' ] ; if ( is_array ( $ val ) ) { if ( isset ( $ val [ 'ID' ] ) ) { return $ this -> authorFactory -> create ( $ val [ 'ID' ] ) ; } else { $ authors = array ( ) ; foreach ( $ val as $ a ) { $ authors [ ] = $ this -> authorFactory -> create ( $ a [ 'ID' ] ) ; } return $ authors ; } } else { if ( isset ( $ this -> base [ 'multiple' ] ) && $ this -> base [ 'multiple' ] ) { return array ( ) ; } else { return null ; } } }
Get a single author object or array of author objects.

If no authors are configured, returned will result will be an empty array
if this is a mutli-select, or null if not.

@return \Tev\Author\Model\Author|\Tev\Author\Model\Author[]|null
Get a single author object or array of author objects .