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 IStructure

Structure implementation for Real Media Library. It handles all SQL query which reads all folders from the database and "collects" it into one tree. You can modify the structure queries by RML/Tree* filters and extending the MatthiasWeb\RealMediaLibrary\attachment\Structure class (implements IStructure).

Direct known implementers

MatthiasWeb\RealMediaLibrary\attachment\Structure

Namespace: MatthiasWeb\RealMediaLibrary\api
Since: 3.3.1
See: wp_rml_structure_reset()
See: wp_rml_structure()
Located at api/IStructure.interface.php

Methods summary

public
# __construct( integer $root = null, array $data = null )

Start reading a structure. If you pass a $root parameter the parameter is not automatically respected. You should then use your own implementation or filters to respect the root. Use this constructor to add your filters and respect your custom Structure class implementation.

Start reading a structure. If you pass a $root parameter the parameter is not automatically respected. You should then use your own implementation or filters to respect the root. Use this constructor to add your filters and respect your custom Structure class implementation.

Parameters

$root
The root folder defined for the structure
$data
Custom data for the structure
public
# initialLoad( )

Checks, if the SQL result is available and load it if not.

Checks, if the SQL result is available and load it if not.

public
# resetData( integer $root = null, boolean $fetchData = true )

Resets the data of the structure.

Resets the data of the structure.

Parameters

$root
The root folder
$fetchData
Determine, if the data should be refetched

See

wp_rml_structure_reset()
public
# byId( $id, $nullForRoot = true )
public
# byAbsolutePath( $path )
public
# getRows( )

Get the SQL query result instead of IFolder objects.

Get the SQL query result instead of IFolder objects.

Returns

object[] The SQL result
public
# getParsed( )

Get all SQL query results as IFolder objects.

Get all SQL query results as IFolder objects.

Returns

IFolder[] The folders
public MatthiasWeb\RealMediaLibrary\api\IFolder[]
# getTree( )

Get all SQL query results placed to a tree. That means it is a "hierarchical" result where you work with ->getChildren(). The first level contains the top folders.

Get all SQL query results placed to a tree. That means it is a "hierarchical" result where you work with ->getChildren(). The first level contains the top folders.

Returns

MatthiasWeb\RealMediaLibrary\api\IFolder[]
The folders
public object[]
# getPlainTree( )

Get all SQL query results placed to a tree. It is fully resolved with all hierarchical plain objects of the folders.

Get all SQL query results placed to a tree. It is fully resolved with all hierarchical plain objects of the folders.

Returns

object[]
public
# getCntAttachments( )

Get the attachment count for this structure.

Get the attachment count for this structure.

Returns

integer Count
public
# getCntRoot( )

Get the attachment count for the "/ Unorganized" folder for this structure.

Get the attachment count for the "/ Unorganized" folder for this structure.

Returns

integer Count
public
# getData( )

Get the custom data.

Get the custom data.

Returns

array Data
public
# setData( array $data )

Set the custom data.

Set the custom data.

Parameters

$data
The custom data
API documentation generated by ApiGen