public static function sortDocumentsByField($documents, $field, $order = 'ASC')
    {
        self::$orderByField = $field;
        self::$order = strtoupper($order) === 'ASC' ? 'ASC' : 'DESC';
        usort($documents, '\CloudControl\Cms\util\DocumentSorter::fieldCompare');
        if ($order === 'DESC') {
            return array_reverse($documents);
        }
        return $documents;
    }