FileBird
Search
K

Functions

Get Folder Detail
<?php
use FileBird\Model\Folder as FolderModel;
$folder_id = 1;
$folder = FolderModel::findById( $folder_id, 'id, name, parent' );
Get Folders
<?php
use FileBird\Classes\Tree;
$folders = Tree::getFolders( null );
Create New Folder
<?php
use FileBird\Model\Folder as FolderModel;
$name = 'Cat';
$parent_id = 0;
FolderModel::newOrGet( $name, $parent_id );
Get Attachment Ids by Folder Id
<?php
use FileBird\Classes\Helpers as Helpers;
$folder_id = 1;
$ids = Helpers::getAttachmentIdsByFolderId( $folder_id );
Add attachment(s) to folder
<?php
use FileBird\Model\Folder as FolderModel;
$post_ids = [ 1, 2, 3 ];
$folder = 1;
FolderModel::setFoldersForPosts( $post_ids, $folder );
Last modified 9mo ago