public function addDocumentFolder($postValues)
    {
        $documentFolderObject = DocumentFolderFactory::createDocumentFolderFromPostValues($postValues);
        if ($postValues['path'] === '/') {
            $documentFolderObject->path = $postValues['path'] . $documentFolderObject->slug;
        } else {
            $documentFolderObject->path = $postValues['path'] . '/' . $documentFolderObject->slug;
        }
        $this->repository->getContentRepository()->saveDocument($documentFolderObject, 'published');
        $this->repository->getContentRepository()->saveDocument($documentFolderObject, 'unpublished');
    }
public function addDocumentFolder($postValues)
    {
        $documentFolderObject = DocumentFolderFactory::createDocumentFolderFromPostValues($postValues);
        if ($postValues['path'] === '/') {
            $documentFolderObject->path = $postValues['path'] . $documentFolderObject->slug;
        } else {
            $documentFolderObject->path = $postValues['path'] . '/' . $documentFolderObject->slug;
        }
        $this->repository->getContentRepository()->saveDocument($documentFolderObject, 'published');
        $this->repository->getContentRepository()->saveDocument($documentFolderObject, 'unpublished');
    }
public function addDocumentFolder ( $ postValues ) { $ documentFolderObject = DocumentFolderFactory :: createDocumentFolderFromPostValues ( $ postValues ) ; if ( $ postValues [ 'path' ] === '/' ) { $ documentFolderObject -> path = $ postValues [ 'path' ] . $ documentFolderObject -> slug ; } else { $ documentFolderObject -> path = $ postValues [ 'path' ] . '/' . $ documentFolderObject -> slug ; } $ this -> repository -> getContentRepository ( ) -> saveDocument ( $ documentFolderObject , 'published' ) ; $ this -> repository -> getContentRepository ( ) -> saveDocument ( $ documentFolderObject , 'unpublished' ) ; }
Add new document in given path

@param array $postValues

@throws \Exception
Add new document in given path