IFolderContent
in
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.
Tags
Table of Contents
Methods
- contentDeleteOrder() : bool
- (Pro only) Deletes the complete order for this folder.
- contentEnableOrder() : bool
- (Pro only) Enable the order functionality for this folder.
- contentIndex() : bool
- (Pro only) Index the order table.
- contentOrder() : true
- (Pro only) See API function for more information.
- contentOrderBy() : bool
- (Pro only) Start to order the given folder content by a given order type.
- contentReindex() : bool
- (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>
- contentRestoreOldCustomNr() : bool
- (Pro only) Restore the current order number to the old custom order number.
- forceContentCustomOrder() : bool
- Override this functionality to force the content custom order in the posts_clauses.
- getAttachmentNextTo() : array<string|int, mixed>
- (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.
- getContentAggregationNr() : int
- (Pro only) Gets the biggest order number;
- getContentCustomOrder() : int
- The content custom order defines the state of the content order functionality:
- getContentNrOf() : int|bool
- (Pro only) Get the order number for a specific attachment in this folder.
- getContentOldCustomNrCount() : int
- (Pro only) Get the old custom order number count so we can decide if already available.
- isContentCustomOrderAllowed() : bool
- Checks if the folder is allowed to use custom content order.
- postsClauses() : bool
- Override the default posts_clauses join and orderby instead of the RML standard.
Methods
contentDeleteOrder()
(Pro only) Deletes the complete order for this folder.
public
contentDeleteOrder() : bool
Tags
Return values
boolcontentEnableOrder()
(Pro only) Enable the order functionality for this folder.
public
contentEnableOrder() : bool
Tags
Return values
boolcontentIndex()
(Pro only) Index the order table.
public
contentIndex([bool $delete = true ]) : bool
Parameters
- $delete : bool = true
-
Delete the old order
Tags
Return values
boolcontentOrder()
(Pro only) See API function for more information.
public
contentOrder(int $attachmentId, int|false $nextId[, int|bool $lastIdInView = false ]) : true
Parameters
- $attachmentId : int
- $nextId : int|false
- $lastIdInView : int|bool = false
Tags
Return values
truecontentOrderBy()
(Pro only) Start to order the given folder content by a given order type.
public
contentOrderBy(string $orderby[, bool $writeMetadata = true ]) : bool
Parameters
- $orderby : string
-
The order type key
- $writeMetadata : bool = true
Tags
Return values
boolcontentReindex()
(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>
public
contentReindex() : bool
Tags
Return values
boolcontentRestoreOldCustomNr()
(Pro only) Restore the current order number to the old custom order number.
public
contentRestoreOldCustomNr() : bool
Tags
Return values
boolforceContentCustomOrder()
Override this functionality to force the content custom order in the posts_clauses.
public
forceContentCustomOrder() : bool
Tags
Return values
boolgetAttachmentNextTo()
(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.
public
getAttachmentNextTo(int $attachmentId) : array<string|int, mixed>
Parameters
- $attachmentId : int
-
The attachment id
Tags
Return values
array<string|int, mixed> —or null
getContentAggregationNr()
(Pro only) Gets the biggest order number;
public
getContentAggregationNr([string $function = 'MAX' ]) : int
Parameters
- $function : string = 'MAX'
-
The SQL aggregation function (MIN or MAX)
Tags
Return values
intgetContentCustomOrder()
The content custom order defines the state of the content order functionality:
public
getContentCustomOrder() : int
0 = No content order defined 1 = Content order is enabled 2 = Custom content order is not allowed
Tags
Return values
int —The content custom order value
getContentNrOf()
(Pro only) Get the order number for a specific attachment in this folder.
public
getContentNrOf(int $attachmentId) : int|bool
Parameters
- $attachmentId : int
-
The attachment id
Tags
Return values
int|boolgetContentOldCustomNrCount()
(Pro only) Get the old custom order number count so we can decide if already available.
public
getContentOldCustomNrCount() : int
Tags
Return values
intisContentCustomOrderAllowed()
Checks if the folder is allowed to use custom content order.
public
isContentCustomOrderAllowed() : bool
Return values
boolpostsClauses()
Override the default posts_clauses join and orderby instead of the RML standard.
public
postsClauses(array<string|int, mixed> $pieces) : bool
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
- $pieces : array<string|int, mixed>
-
The posts_clauses $pieces parameter