Class Sortable
Handles the sortable content in the folder. The methods of this class contains always the keyword "content".
- MatthiasWeb\RealMediaLibrary\base\Base
-
MatthiasWeb\RealMediaLibrary\folder\BaseFolder implements MatthiasWeb\RealMediaLibrary\api\IFolder
-
MatthiasWeb\RealMediaLibrary\folder\Creatable
-
MatthiasWeb\RealMediaLibrary\order\Sortable
Direct known subclasses
MatthiasWeb\RealMediaLibrary\folder\Collection
,
MatthiasWeb\RealMediaLibrary\folder\Folder
,
MatthiasWeb\RealMediaLibrary\folder\Gallery
,
MatthiasWeb\RealMediaLibrary\folder\Root
Methods summary
public
|
#
__construct( $id, $parent = -1, $name = "", $slug = "", $absolute = "", $order = -1, $cnt = 0, $row = array() )
C'tor with the main properties. |
public
true
|
#
contentOrder( $attachmentId, $nextId, $lastIdInView = false )
See API function for more information. |
public
|
|
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 |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
#
getContentCustomOrder( )
The content custom order defines the state of the content order functionality: |
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. |
public
|
#
getContentOrderNumbers( boolean $fromCache = true, boolean $indexMode = true )
Get the whole order table. |
public
|
|
public
integer|boolean
|
#
getContentNrOf( integer $attachmentId )
Get the order number for a specific attachment in this folder. |
public
|
#
getContentOldCustomNrCount( )
Get the old custom order number count so we can decide if already available. |
public static
|
|
public static
|
#
folder_insert_anyParentHasMetadata( $conditions, $folder, $args )
Add a condition for the automatic order |
public static
|
|
public static
|
#
posts_clauses( $pieces, $query )
JOIN the order table and orderby the nr. It is only affected when $query = new \WP_Query(array( 'post_status' => 'inherit', 'post_type' => 'attachment', 'rml_folder' => 4, 'orderby' => 'rml' )); |
public static
|
|
public static
|
Methods inherited from MatthiasWeb\RealMediaLibrary\folder\Creatable
addChildren()
,
getMaxOrder()
,
getRowData()
,
getTypeDescription()
,
getTypeName()
,
insert()
,
isValidName()
,
persist()
,
read()
,
reindexChildrens()
,
relocate()
,
setName()
,
setParent()
,
singleCheckInsert()
,
singleCheckInsertPermissions()
,
updateThisAndChildrensAbsolutePath()
,
xread()
Methods inherited from MatthiasWeb\RealMediaLibrary\folder\BaseFolder
anyChildrenHas()
,
anyChildrenHasMetadata()
,
anyParentHas()
,
anyParentHasMetadata()
,
getAbsolutePath()
,
getAllParents()
,
getChildren()
,
getCnt()
,
getId()
,
getName()
,
getOrder()
,
getOwner()
,
getParent()
,
getPath()
,
getPlain()
,
getRestrictions()
,
getRestrictionsCount()
,
getSlug()
,
hasChildren()
,
is()
,
isRestrictFor()
,
isValidChildrenType()
,
setRestrictions()
Methods inherited from MatthiasWeb\RealMediaLibrary\base\Base
Methods inherited from MatthiasWeb\RealMediaLibrary\api\IFolder
Properties summary
Properties inherited from MatthiasWeb\RealMediaLibrary\folder\BaseFolder
$absolutePath
,
$children
,
$cnt
,
$contentCustomOrder
,
$id
,
$name
,
$order
,
$orderNumbers
,
$parent
,
$restrictions
,
$restrictionsCount
,
$row
,
$slug
,
$systemReservedFolders