src/Model/Page.php
public function setVisibility($visibility)
    {
        if (!in_array($visibility, [self::VISIBILITY_PROTECTED, self::VISIBILITY_PUBLIC])) {
            throw new \InvalidArgumentException('Invalid visibility');
        }
        $this->visibility = $visibility;

        return $this;
    }
public function setVisibility($visibility)
    {
        if (!in_array($visibility, [self::VISIBILITY_PROTECTED, self::VISIBILITY_PUBLIC])) {
            throw new \InvalidArgumentException('Invalid visibility');
        }
        $this->visibility = $visibility;

        return $this;
    }
public function setVisibility ( $ visibility ) { if ( ! in_array ( $ visibility , [ self :: VISIBILITY_PROTECTED , self :: VISIBILITY_PUBLIC ] ) ) { throw new \ InvalidArgumentException ( 'Invalid visibility' ) ; } $ this -> visibility = $ visibility ; return $ this ; }
Set page visibility.

@param string $visibility

@return $this

@throws \InvalidArgumentException
Set page visibility .