public function saveLinkedDocuments()
    {
        if (empty($this->KeyValuePairs) || !$this->isChanged('KeyValuePairs')) {
            return;
        }

        $keyValuesPair = Convert::json2array($this->KeyValuePairs);

        /** @var DMSDocument $dmsDoc */
        $dmsDoc = singleton('DMSDocument');
        $context = $dmsDoc->getDefaultSearchContext();

        $sortBy = $this->SortBy ? $this->SortBy : 'LastEdited';
        $sortByDirection = $this->SortByDirection ? $this->SortByDirection : 'DESC';
        $sortedBy = sprintf('%s %s', $sortBy, $sortByDirection);

        /** @var DataList $documents */
        $documents = $context->getResults($keyValuesPair, $sortedBy);
        $documents = $this->addEmbargoConditions($documents);
        $documents = $this->addQueryBuilderSearchResults($documents);
    }
public function saveLinkedDocuments()
    {
        if (empty($this->KeyValuePairs) || !$this->isChanged('KeyValuePairs')) {
            return;
        }

        $keyValuesPair = Convert::json2array($this->KeyValuePairs);

        /** @var DMSDocument $dmsDoc */
        $dmsDoc = singleton('DMSDocument');
        $context = $dmsDoc->getDefaultSearchContext();

        $sortBy = $this->SortBy ? $this->SortBy : 'LastEdited';
        $sortByDirection = $this->SortByDirection ? $this->SortByDirection : 'DESC';
        $sortedBy = sprintf('%s %s', $sortBy, $sortByDirection);

        /** @var DataList $documents */
        $documents = $context->getResults($keyValuesPair, $sortedBy);
        $documents = $this->addEmbargoConditions($documents);
        $documents = $this->addQueryBuilderSearchResults($documents);
    }
public function saveLinkedDocuments ( ) { if ( empty ( $ this -> KeyValuePairs ) || ! $ this -> isChanged ( 'KeyValuePairs' ) ) { return ; } $ keyValuesPair = Convert :: json2array ( $ this -> KeyValuePairs ) ; /** @var DMSDocument $dmsDoc */ $ dmsDoc = singleton ( 'DMSDocument' ) ; $ context = $ dmsDoc -> getDefaultSearchContext ( ) ; $ sortBy = $ this -> SortBy ? $ this -> SortBy : 'LastEdited' ; $ sortByDirection = $ this -> SortByDirection ? $ this -> SortByDirection : 'DESC' ; $ sortedBy = sprintf ( '%s %s' , $ sortBy , $ sortByDirection ) ; /** @var DataList $documents */ $ documents = $ context -> getResults ( $ keyValuesPair , $ sortedBy ) ; $ documents = $ this -> addEmbargoConditions ( $ documents ) ; $ documents = $ this -> addQueryBuilderSearchResults ( $ documents ) ; }
Retrieve a list of the documents in this set. An extension hook is provided before the result is returned.
Retrieve a list of the documents in this set . An extension hook is provided before the result is returned .