public function setContentType($contentType)
    {
        if ($contentType instanceof ContentType) {
            $contentType = $contentType->getId();
        }

        $this->contentType = $contentType;

        $this->setType('Entry');

        return $this;
    }
public function setContentType($contentType)
    {
        if ($contentType instanceof ContentType) {
            $contentType = $contentType->getId();
        }

        $this->contentType = $contentType;

        $this->setType('Entry');

        return $this;
    }
public function setContentType ( $ contentType ) { if ( $ contentType instanceof ContentType ) { $ contentType = $ contentType -> getId ( ) ; } $ this -> contentType = $ contentType ; $ this -> setType ( 'Entry' ) ; return $ this ; }
Set the content type to which results should be limited. Set to NULL to not filter for a content type.

@param ContentType|string|null $contentType

@return $this
Set the content type to which results should be limited . Set to NULL to not filter for a content type .