public function addLayout(ItemInterface $item)
    {
        if ($this->hasLayout($item->getId()) === true) {
            throw new \RuntimeException(sprintf('A previous layout item exists with the same id: "%s".', $item->getId()));
        }

        $this->layouts[$item->getId()] = $item;
    }
public function addLayout(ItemInterface $item)
    {
        if ($this->hasLayout($item->getId()) === true) {
            throw new \RuntimeException(sprintf('A previous layout item exists with the same id: "%s".', $item->getId()));
        }

        $this->layouts[$item->getId()] = $item;
    }
public function addLayout ( ItemInterface $ item ) { if ( $ this -> hasLayout ( $ item -> getId ( ) ) === true ) { throw new \ RuntimeException ( sprintf ( 'A previous layout item exists with the same id: "%s".' , $ item -> getId ( ) ) ) ; } $ this -> layouts [ $ item -> getId ( ) ] = $ item ; }
Adds a new layout item.

@param Yosymfony\Spress\Core\DataSource\ItemInterface $item

@throws RuntimeException If a previous layout item exists with the same id
Adds a new layout item .