function getViewModel ()
  {
    if (isset($this->shadowViewModel))
      return $this->shadowViewModel;
    /** @var DocumentFragment $shadowDOM */
    $shadowDOM = $this->getShadowDOM ();
    return $shadowDOM
      ? $shadowDOM->getDataBinder ()->getViewModel ()
      : null;
  }
function getViewModel ()
  {
    if (isset($this->shadowViewModel))
      return $this->shadowViewModel;
    /** @var DocumentFragment $shadowDOM */
    $shadowDOM = $this->getShadowDOM ();
    return $shadowDOM
      ? $shadowDOM->getDataBinder ()->getViewModel ()
      : null;
  }
function getViewModel ( ) { if ( isset ( $ this -> shadowViewModel ) ) return $ this -> shadowViewModel ; /** @var DocumentFragment $shadowDOM */ $ shadowDOM = $ this -> getShadowDOM ( ) ; return $ shadowDOM ? $ shadowDOM -> getDataBinder ( ) -> getViewModel ( ) : null ; }
Returns the component's view model.

#####Important
On a composite component, the view model data is set on the shadow DOM's view model, **NOT** on the component's
own view model, so that bindings on the component's properties (which may hold DOMs themselves) are computed on the
current binding context, not on the shadow DOM's context, which is a subdocument with its own isolated context.

<p>If the view is not a Matisse template (and therefore there is no shadow DOM), an alternate view model is used
(see {@see $shadowViewModel}).

><p>This method overrides {@see DataBindingTrait}.

@return ViewModelInterface
Returns the component s view model .