Property | Type | Description | |
---|---|---|---|
$file | |||
$imageFileTypes |
Property | Type | Description | |
---|---|---|---|
$tagIds | array | null |
Method | Description | |
---|---|---|
addOwner ( integer $owner_id, string $owner, string $owner_attribute ) : boolean | Add owner to mediafiles table | |
afterDelete ( ) | ||
afterSave ( $insert, $changedAttributes ) | ||
attributeLabels ( ) | ||
beforeDelete ( ) | ||
behaviors ( ) | ||
createDefaultThumb ( array $routes ) | Create default thumbnail | |
createThumbs ( array $routes, array $presets ) : boolean | Create thumbs for this image | |
deleteFile ( array $routes ) : boolean | Delete file | |
deleteThumbs ( array $routes ) | Delete thumbnails for current image | |
findByTypes ( array $types ) : array | |
Search models by file types | |
findByUrl ( $url ) : static | Find model by url | |
getDefaultThumbUrl ( $baseUrl = '' ) : string | ||
getDefaultUploadThumbUrl ( $baseUrl = '' ) : string | ||
getFileSize ( ) : string | ||
getImagesList ( |
||
getLastChanges ( ) : integer | ||
getOriginalImageSize ( array $routes, string $delimiter = ' × ' ) : string | This method wrap getimagesize() function | |
getOriginalImageSizes ( array $routes ) : array | This method wrap getimagesize() function | |
getOwners ( ) : |
||
getTagIds ( ) : array | null | ||
getTags ( ) : |
||
getThumbImage ( string $alias, array $options = [] ) : string | Thumbnail image html tag | |
getThumbUrl ( string $alias ) : string | ||
getThumbs ( ) : array | ||
init ( ) | ||
isImage ( ) : boolean | ||
loadOneByOwner ( $owner, $owner_id, $owner_attribute ) | ||
removeOwner ( integer $owner_id, string $owner, string $owner_attribute ) : boolean | Remove this mediafile owner | |
rules ( ) | ||
saveUploadedFile ( array $routes, boolean $rename = false ) : boolean | Save just uploaded file | |
setTagIds ( $value ) | ||
tableName ( ) |
Method | Description | |
---|---|---|
getThumbFilename ( $original, $extension, $alias, $width, $height ) : string | Returns thumbnail name |
public createDefaultThumb ( array $routes ) | ||
$routes | array | see routes in module config |
public deleteFile ( array $routes ) : boolean | ||
$routes | array | see routes in module config |
return | boolean |
public deleteThumbs ( array $routes ) | ||
$routes | array | see routes in module config |
public static findByTypes ( array $types ) : array | |
||
$types | array | file types |
return | array | |
public static findByUrl ( $url ) : static | ||
$url | ||
return | static |
public getDefaultThumbUrl ( $baseUrl = '' ) : string | ||
$baseUrl | ||
return | string | default thumbnail for image |
public getDefaultUploadThumbUrl ( $baseUrl = '' ) : string | ||
$baseUrl | ||
return | string | default thumbnail for image |
public getImagesList ( |
||
$module | ||
return | array | images list |
public getLastChanges ( ) : integer | ||
return | integer | last changes timestamp |
public getOriginalImageSizes ( array $routes ) : array | ||
$routes | array | see routes in module config |
return | array |
protected getThumbFilename ( $original, $extension, $alias, $width, $height ) : string | ||
$original | ||
$extension | ||
$alias | ||
$width | ||
$height | ||
return | string |
public getThumbUrl ( string $alias ) : string | ||
$alias | string | thumb alias |
return | string | thumb url |
public static loadOneByOwner ( $owner, $owner_id, $owner_attribute ) |