static function fetchCollectionsList( $contentObjectID = false, $creatorID = false , $userIdentifier = false, $limitArray = false, $sortArray = false, $asObject = true ) { $conditions = array(); if ( $contentObjectID ) $conditions = array( 'contentobject_id' => $contentObjectID ); if ( $creatorID ) $conditions['creator_id'] = $creatorID; if ( $userIdentifier ) $conditions['user_identifier'] = $userIdentifier; $limit = null; if ( isset( $limitArray['limit'] ) ) { $limit = $limitArray; if ( ! ( $limit['offset'] ) ) { $limit['offset'] = 0; } } $sorts = null; if ( $sortArray !== false ) { if ( count( $sortArray ) >= 2 ) { $sorts = array(); $def = eZInformationCollection::definition(); if ( ! ( is_array( $sortArray[0] ) ) ) { $sortArray = array( 0 => $sortArray ); } foreach ( $sortArray as $sortElement ) { $result = eZInformationCollection::getSortArrayFromParam( $def, $sortElement ); $sorts = array_merge($sorts, $result ); } } else { eZDebug::writeWarning( 'Too few parameters for setting sorting in fetch, ignoring', __METHOD__ ); } } return eZPersistentObject::fetchObjectList( eZInformationCollection::definition(), null, $conditions, $sorts, $limit, $asObject ); }