\MatthiasWeb\RealMediaLibrary\apiIFolderContent

This interface provides elementary action methods for folder content. All folder types (Folder, Collection, Gallery, .

..) have implemented this interface. Also the root ("Unorganized") is a folder and implements this interface.

Summary

Methods
Constants
contentOrder()
contentOrderBy()
contentIndex()
contentReindex()
contentEnableOrder()
contentDeleteOrder()
contentRestoreOldCustomNr()
isContentCustomOrderAllowed()
getContentCustomOrder()
forceContentCustomOrder()
postsClauses()
getAttachmentNextTo()
getContentAggregationNr()
getContentNrOf()
getContentOldCustomNrCount()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

contentOrder()

contentOrder(integer  $attachmentId,integer  $nextId,integer|boolean  $lastIdInView = false): true

(Pro only) See API function for more information.

Parameters

integer $attachmentId
integer $nextId
integer|boolean $lastIdInView

Throws

\Exception
\MatthiasWeb\RealMediaLibrary\exception\OnlyInProVersionException

Returns

true

contentOrderBy()

contentOrderBy(string  $orderby,boolean  $writeMetadata = true): boolean

(Pro only) Start to order the given folder content by a given order type.

Parameters

string $orderby

The order type key

boolean $writeMetadata

Throws

\MatthiasWeb\RealMediaLibrary\exception\OnlyInProVersionException

Returns

boolean

contentIndex()

contentIndex(boolean  $delete = true): boolean

(Pro only) Index the order table.

Parameters

boolean $delete

Delete the old order

Throws

\MatthiasWeb\RealMediaLibrary\exception\OnlyInProVersionException

Returns

boolean

contentReindex()

contentReindex(): boolean

(Pro only) This function retrieves the order of the order table and removes empty spaces, for example: <pre>0 1 5 7 8 9 10 => 0 1 2 3 4 5 6</pre>

Throws

\MatthiasWeb\RealMediaLibrary\exception\OnlyInProVersionException

Returns

boolean

contentEnableOrder()

contentEnableOrder(): boolean

(Pro only) Enable the order functionality for this folder.

Throws

\MatthiasWeb\RealMediaLibrary\exception\OnlyInProVersionException

Returns

boolean

contentDeleteOrder()

contentDeleteOrder(): boolean

(Pro only) Deletes the complete order for this folder.

Throws

\MatthiasWeb\RealMediaLibrary\exception\OnlyInProVersionException

Returns

boolean

contentRestoreOldCustomNr()

contentRestoreOldCustomNr(): boolean

(Pro only) Restore the current order number to the old custom order number.

Throws

\MatthiasWeb\RealMediaLibrary\exception\OnlyInProVersionException

Returns

boolean

isContentCustomOrderAllowed()

isContentCustomOrderAllowed(): boolean

Checks if the folder is allowed to use custom content order.

Returns

boolean

getContentCustomOrder()

getContentCustomOrder(): integer

The content custom order defines the state of the content order functionality:

0 = No content order defined
1 = Content order is enabled
2 = Custom content order is not allowed

Returns

integer —

The content custom order value

forceContentCustomOrder()

forceContentCustomOrder(): boolean

Override this functionality to force the content custom order in the posts_clauses.

Returns

boolean

postsClauses()

postsClauses(array  $pieces): boolean

Override the default posts_clauses join and orderby instead of the RML standard.

This can be useful if you want to take the order from another relationship. You have to return true if you have overwritten it.

Parameters

array $pieces

The posts_clauses $pieces parameter

Returns

boolean

getAttachmentNextTo()

getAttachmentNextTo(integer  $attachmentId): array

(Pro only) Get the next attachment row for a specific attachment. It returns false if the attachment is at the end or the folder has no custom content order.

Parameters

integer $attachmentId

The attachment id

Throws

\MatthiasWeb\RealMediaLibrary\exception\OnlyInProVersionException

Returns

array —

or null

getContentAggregationNr()

getContentAggregationNr(string  $function = 'MAX'): integer

(Pro only) Gets the biggest order number;

Parameters

string $function

The SQL aggregation function (MIN or MAX)

Throws

\MatthiasWeb\RealMediaLibrary\exception\OnlyInProVersionException

Returns

integer

getContentNrOf()

getContentNrOf(integer  $attachmentId): integer|boolean

(Pro only) Get the order number for a specific attachment in this folder.

Parameters

integer $attachmentId

The attachment id

Throws

\MatthiasWeb\RealMediaLibrary\exception\OnlyInProVersionException

Returns

integer|boolean

getContentOldCustomNrCount()

getContentOldCustomNrCount(): integer

(Pro only) Get the old custom order number count so we can decide if already available.

Throws

\MatthiasWeb\RealMediaLibrary\exception\OnlyInProVersionException

Returns

integer