PhpOffice\PhpPresentation\Slide::setSlideLayout PHP Method

setSlideLayout() public method

Set slide layout
public setSlideLayout ( SlideLayout $layout ) : Slide
$layout PhpOffice\PhpPresentation\Slide\SlideLayout
return Slide
    public function setSlideLayout(SlideLayout $layout)
    {
        $this->slideLayout = $layout;
        return $this;
    }

Usage Example

Example #1
0
 public function testSlideLayout()
 {
     $object = new Slide();
     $this->assertEquals(Slide\Layout::BLANK, $object->getSlideLayout());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Slide', $object->setSlideLayout());
     $this->assertEquals(Slide\Layout::BLANK, $object->getSlideLayout());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Slide', $object->setSlideLayout(Slide\Layout::TITLE_SLIDE));
     $this->assertEquals(Slide\Layout::TITLE_SLIDE, $object->getSlideLayout());
 }