DNRoot::CompleteDataArchives PHP Method

CompleteDataArchives() public method

Returns a list of all archive files that can be accessed by the currently logged-in {@link Member}
public CompleteDataArchives ( ) : PaginatedList
return PaginatedList
    public function CompleteDataArchives()
    {
        $project = $this->getCurrentProject();
        $archives = new ArrayList();
        $archiveList = $project->Environments()->relation("DataArchives");
        if ($archiveList->count() > 0) {
            foreach ($archiveList as $archive) {
                if (!$archive->isPending()) {
                    $archives->push($archive);
                }
            }
        }
        return new PaginatedList($archives->sort("Created", "DESC"), $this->request);
    }