New version 0.9 has been released! Jun 16, 2015
×

Page module

Description

File module helps you to create live editable file downloads on frontend.


Include

use yii\easyii\modules\file\api\File;


Public functions

array File::items( $options = [] )
$options array
  • where (mixed) - additional condition, details
  • pagination (array) - properties for Pagination object.
Returns array of FileObject

object File::get( $id_slug )
$id_slug integer / string File identifier can be integer (id) or string (slug)
Returns FileObject or null if not found.

array File::last( $limit = 1 )
$limit integer Count of last files
Returns array of FileObject

string File::pages()
Returns pagination html generated by yii\widgets\LinkPager widget.

object File::pagination()
Returns yii\data\Pagination object.

FileObject

Public Properties

$title string File title
$slug string File slug
$file string Url path to download file
$link string Ready to use <a> tag
$bytes integer Filesize in bytes
$size string Formatted filesize
$downloads int How many times file was downloaded
$time int File create unix time
$date string File create formatted date
$model yii\db\ActiveRecord File ActiveRecord object