Set documentType

@param string $documentType
@return Document
190204
public function setDocumentType($documentType)
    {
    	if (!in_array($documentType, self::getDocumentTypeValues())) {
    		throw new \InvalidArgumentException(
				sprintf('Invalid value for document.documentType : %s.', $documentType)
    		);
    	}
    	
        $this->documentType = $documentType;
    
        return $this;
    }
61740
public function setAdapterType($type)
    {
        $adapter_type = '\Library\Reporter\Adapter\\'.ucfirst($type);
        if (class_exists($adapter_type)) {
            $this->setAdapter(new $adapter_type);
        } else {
            throw new \RuntimeException(
                sprintf('Reporter adapter for type "%s" doesn\'t exist!', $adapter_type)
            );
        }
        return $this;
    }
1165366
public function setPropertyTypeFile($fileType = null)
    {
        $this->setPropertyType('F');

        if (!is_null($fileType)) {
            $this->setFileType($fileType);
        }

        return $this;
    }
85394
public function setType($type)
    {
        if (!is_string($type) || empty($type)) {
            throw MetadataException::invalidEntityType();
        }
        $this->type = $type;
        return $this;
    }
548924
public function setDocumentType($document_type)
    {
        $allowed_values = $this->getDocumentTypeAllowableValues();
        if (!in_array($document_type, $allowed_values)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'document_type', must be one of '%s'",
                    implode("', '", $allowed_values)
                )
            );
        }
        $this->container['document_type'] = $document_type;

        return $this;
    }
779471
public function setObjectType($type)
    {
        if (!is_null($type)) {
            $type = (string) $type;
        }

        $this->objectType = $type;
        return $this;
    }
1095423
public function setType( $type )
    {
        $this->type = is_int( $type ) ? $type : self::getStorableType( $type );
        return $this;
    }
264559
private function setClientMediaType($clientMediaType)
    {
        $this->clientMediaType = (empty($clientMediaType) ? null : (string) $clientMediaType);

        return $this;
    }
658126
protected function setType($type)
    {
        if ($type == '*/*' || $type == 'application/octet-stream')
        {
            $type = \Module\HttpFoundation\getMimeTypeOfFile($this->getTmpName(), false);
            if ( empty($type) )
                if ( null !== $solved = \Module\HttpFoundation\getMimeTypeOfFile($this->getClientFilename()) )
                    $type = $solved;
                else
                    $type = 'application/octet-stream';
        }

        $this->type = (string) $type;
        return $this;
    }
1286991
public function setType(string $contentType, ?string $charset = null): Response
	{
		$this->contentType = $contentType;

		if($charset !== null)
		{
			$this->charset = $charset;
		}

		return $this;
	}
1157796
public function updateDocumentAction($documentId, $parentType)
    {
        if (null !== $response = $this->checkAuth($this->getAdminResources()->getResource($parentType, static::MODULE_RIGHT), array(), AccessManager::UPDATE)) {
            return $response;
        }

        $documentInstance = $this->updateFileAction($documentId, $parentType, 'document', TheliaEvents::DOCUMENT_UPDATE);

        if ($documentInstance instanceof \Symfony\Component\HttpFoundation\Response) {
            return $documentInstance;
        } else {
            return $this->render('document-edit', array(
                'documentId' => $documentId,
                'documentType' => $parentType,
                'redirectUrl' => $documentInstance->getRedirectionUrl(),
                'formId' => $documentInstance->getUpdateFormId()
            ));
        }
    }
328761
public function setEmailType(\Sulu\Bundle\ContactBundle\Entity\EmailType $emailType)
    {
        $this->emailType = $emailType;

        return $this;
    }
702241
public function setRepository(DocumentRepository $repository)
    {
        $this->repository = $repository;
        $this->manager = $repository->getDocumentManager();
        return $this;
    }
98160
public function setType($type)
    {
        $this->type = $type;
        if ($this->type == "xml") {
            $this->formatter = new XMLPDOResultFormatter();
        } elseif ($this->type == "plain") {
            $this->formatter = new PlainPDOResultFormatter();
        } else {
            throw new BuildException("Formatter '" . $this->type . "' not implemented");
        }
    }
616974
function contentType($contentType)
    {
        $this->requestDecorator->addHeader('X-Contentful-Content-Type', $contentType);
        $this->requestDecorator->addParameter('content_type', '=', $contentType);
        return $this;
    }
1346736
public function setEmbedType($embedType)
    {
        $embedType = strtolower($embedType);
        $this->validateType($embedType);
        $this->embedType = $embedType;
        return $this;
    }
828235
public function setType($type)
    {
        if (is_string($type)) {
            if (in_array($type, [
                self::TYPE_ALL, self::TYPE_PRINT, self::TYPE_SCREEN, self::TYPE_SPEECH,
                self::TYPE_AURAL, self::TYPE_BRAILLE, self::TYPE_EMBOSSED, self::TYPE_HANDHELD,
                self::TYPE_PROJECTION, self::TYPE_TTY, self::TYPE_TV
            ])) {
                $this->type = $type;

                return $this;
            } else {
                // Invalid type values have to be handled as "not all"
                // @see: http://dev.w3.org/csswg/mediaqueries-4/#error-handling
                $this->type = self::TYPE_ALL;
                $this->setIsNot(true);
                $this->setIsOnly(false);
            }
        } else {
            throw new \InvalidArgumentException(
                "Invalid type '" . gettype($type). "' for argument 'type' given."
            );
        }
    }