Overview
  • Namespace
  • Class

Namespaces

  • MatthiasWeb
    • RealMediaLibrary
      • api
      • attachment
      • base
      • comp
        • complexquery
      • folder
      • general
      • metadata
      • order
      • rest
      • usersettings
  • None

Interfaces

  • IFolder
  • IFolderActions
  • IFolderContent
  • IMetadata
  • IStructure
  • IUserSettings

Interface IFolderContent

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.

Direct known implementers

MatthiasWeb\RealMediaLibrary\api\IFolder

Indirect known implementers

MatthiasWeb\RealMediaLibrary\folder\BaseFolder, MatthiasWeb\RealMediaLibrary\folder\Collection, MatthiasWeb\RealMediaLibrary\folder\Creatable, MatthiasWeb\RealMediaLibrary\folder\Folder, MatthiasWeb\RealMediaLibrary\folder\Gallery, MatthiasWeb\RealMediaLibrary\folder\Root, MatthiasWeb\RealMediaLibrary\order\Sortable

Namespace: MatthiasWeb\RealMediaLibrary\api
Since: 3.3.1
Located at api/IFolderContent.interface.php

Methods summary

public true
# contentOrder( $attachmentId, $nextId, $lastIdInView = false )

See API function for more information.

See API function for more information.

Returns

true

Throws

Exception

See

wp_attachment_order_update()
public
# contentIndex( boolean $delete = true )

Index the order table.

Index the order table.

Parameters

$delete
Delete the old order

Returns

boolean
public
# contentReindex( )

This function retrieves the order of the order table and removes empty spaces, for example:

0 1 5 7 8 9 10 =>
0 1 2 3 4 5 6

This function retrieves the order of the order table and removes empty spaces, for example:

0 1 5 7 8 9 10 =>
0 1 2 3 4 5 6

Returns

boolean
public
# contentEnableOrder( )

Enable the order functionlity for this folder.

Enable the order functionlity for this folder.

See

IFolderContent::getContentCustomOrder()

Returns

boolean
public
# contentDeleteOrder( )

Deletes the complete order for this folder.

Deletes the complete order for this folder.

See

IFolderContent::getContentCustomOrder()

Returns

boolean
public
# contentRestoreOldCustomNr( )

Restore the current order number to the old custom order number.

Restore the current order number to the old custom order number.

Returns

boolean
public
# isContentCustomOrderAllowed( )
public
# getContentCustomOrder( )

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

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

See

IFolderContent::isContentCustomOrderAllowed()
IFolderContent::contentEnableOrder()

Returns

integer The content custom order value
public
# getAttachmentNextTo( integer $attachmentId )

Get the next attachment id for a specific attachment. It returns false if the attachment is at the end or the folder has no custom content order.

Get the next attachment id for a specific attachment. It returns false if the attachment is at the end or the folder has no custom content order.

Parameters

$attachmentId
The attachment id

Returns

boolean Int or false
public
# getContentOrderNumbers( boolean $fromCache = true, boolean $indexMode = true )

Get the whole order table.

Get the whole order table.

Parameters

$fromCache
load the data from the cache
$indexMode
the return is an indexed array with attachment id key

Returns

boolean|int[]
public
# getContentAggregationNr( string $function = "MAX" )

Gets the biggest order number;

Gets the biggest order number;

Parameters

$function
The SQL aggregation function (MIN or MAX)

Returns

integer
public integer|boolean
# getContentNrOf( integer $attachmentId )

Get the order number for a specific attachment in this folder.

Get the order number for a specific attachment in this folder.

Parameters

$attachmentId
The attachment id

Returns

integer|boolean
public
# getContentOldCustomNrCount( )

Get the old custom order number count so we can decide if already available.

Get the old custom order number count so we can decide if already available.

Returns

int Count
API documentation generated by ApiGen