Gc\Document\Model::getView PHP Method

getView() public method

get View Model
public getView ( ) : Model
return Gc\View\Model
    public function getView()
    {
        if ($this->getData('view') == null) {
            $view = View\Model::fromId($this->getViewId());
            if ($view !== null) {
                $this->setData('view', $view);
            }
        }
        return $this->getData('view');
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Test
  *
  * @return void
  */
 public function testGetView()
 {
     $this->assertInstanceOf('Gc\\View\\Model', $this->object->getView());
 }