Gc\Document\Model::getLayout PHP Method

getLayout() public method

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

Usage Example

Esempio n. 1
0
 /**
  * Test
  *
  * @return void
  */
 public function testGetLayout()
 {
     $this->assertInstanceOf('Gc\\Layout\\Model', $this->object->getLayout());
 }