Overview

Packages

  • currencysymbol
  • MAbout
  • Mage
    • Admin
    • Adminhtml
    • AdminNotification
    • Api
    • Api2
    • Authorizenet
    • Backup
    • Bundle
    • Captcha
    • Catalog
    • CatalogIndex
    • CatalogInventory
    • CatalogRule
    • CatalogSearch
    • Centinel
    • Checkout
    • Cms
    • Compiler
    • Connect
    • Contacts
    • Core
    • Cron
    • CurrencySymbol
    • Customer
    • Dataflow
    • Directory
    • DirtectPost
    • Downloadable
    • Eav
    • GiftMessage
    • GoogleAnalytics
    • GoogleBase
    • GoogleCheckout
    • ImportExport
    • Index
    • Install
    • Log
    • Media
    • Newsletter
    • Oauth
    • Page
    • PageCache
    • Paygate
    • Payment
    • Paypal
    • PaypalUk
    • Persistent
    • Poll
    • ProductAlert
    • Rating
    • Reports
    • Review
    • Rss
    • Rule
    • Sales
    • SalesRule
    • Sedfriend
    • Sendfriend
    • Shipping
    • Sitemap
    • Tag
    • Tax
    • Usa
    • Weee
    • Widget
    • Wishlist
    • XmlConnect
  • None
  • Phoenix
    • Moneybookers
  • PHP
  • Zend
    • Date
    • Mime
    • XmlRpc

Classes

  • Mage_Adminhtml_Cms_PageController
  • Mage_Adminhtml_Model_System_Config_Source_Cms_Wysiwyg_Enabled
  • Mage_Cms_Block_Block
  • Mage_Cms_Block_Page
  • Mage_Cms_Block_Widget_Block
  • Mage_Cms_Block_Widget_Page_Link
  • Mage_Cms_Controller_Router
  • Mage_Cms_Helper_Data
  • Mage_Cms_Helper_Page
  • Mage_Cms_Helper_Wysiwyg_Images
  • Mage_Cms_IndexController
  • Mage_Cms_Model_Block
  • Mage_Cms_Model_Mysql4_Block
  • Mage_Cms_Model_Mysql4_Block_Collection
  • Mage_Cms_Model_Mysql4_Page
  • Mage_Cms_Model_Mysql4_Page_Collection
  • Mage_Cms_Model_Mysql4_Page_Service
  • Mage_Cms_Model_Observer
  • Mage_Cms_Model_Page
  • Mage_Cms_Model_Resource_Block
  • Mage_Cms_Model_Resource_Block_Collection
  • Mage_Cms_Model_Resource_Page
  • Mage_Cms_Model_Resource_Page_Collection
  • Mage_Cms_Model_Resource_Page_Service
  • Mage_Cms_Model_Template_Filter
  • Mage_Cms_Model_Wysiwyg_Config
  • Mage_Cms_Model_Wysiwyg_Images_Storage
  • Mage_Cms_Model_Wysiwyg_Images_Storage_Collection
  • Mage_Cms_PageController
  • Overview
  • Package
  • Class
  • Tree

Class Mage_Cms_Model_Wysiwyg_Images_Storage

Wysiwyg Images model

Varien_Object
Extended by Mage_Cms_Model_Wysiwyg_Images_Storage
Package: Mage\Cms
Category: Mage
Copyright: Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
License: Open Software License (OSL 3.0)
Author: Magento Core Team <core@magentocommerce.com>
Located at code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php
Methods summary
public Varien_Data_Collection_Filesystem
# getDirsCollection( string $path )

Return one-level child directories for specified path

Return one-level child directories for specified path

Parameters

$path
string
$path Parent directory path

Returns

Varien_Data_Collection_Filesystem
public Varien_Data_Collection_Filesystem
# getFilesCollection( string $path, string $type = null )

Return files

Return files

Parameters

$path
string
$path Parent directory path
$type
string
$type Type of storage, e.g. image, media etc.

Returns

Varien_Data_Collection_Filesystem
public Varien_Data_Collection_Filesystem
# getCollection( string $path = null )

Storage collection

Storage collection

Parameters

$path
string
$path Path to the directory

Returns

Varien_Data_Collection_Filesystem
public array
# createDirectory( string $name, string $path )

Create new directory in storage

Create new directory in storage

Parameters

$name
string
$name New directory name
$path
string
$path Parent directory path

Returns

array
New directory info

Throws

Mage_Core_Exception
public
# deleteDirectory( string $path )

Recursively delete directory from storage

Recursively delete directory from storage

Parameters

$path
string
$path Target dir
public Mage_Cms_Model_Wysiwyg_Images_Storage
# deleteFile( string $target )

Delete file (and its thumbnail if exists) from storage

Delete file (and its thumbnail if exists) from storage

Parameters

$target
string
$target File path to be deleted

Returns

Mage_Cms_Model_Wysiwyg_Images_Storage
public array
# uploadFile( string $targetPath, string $type = null )

Upload and resize new file

Upload and resize new file

Parameters

$targetPath
string
$targetPath Target directory
$type
string
$type Type of storage, e.g. image, media etc.

Returns

array
File info Array

Throws

Mage_Core_Exception
public string
# getThumbnailPath( string $filePath, boolean $checkFile = false )

Thumbnail path getter

Thumbnail path getter

Parameters

$filePath
string
$filePath original file path
$checkFile
boolean
$checkFile OPTIONAL is it necessary to check file availability

Returns

string
| false
public string
# getThumbnailUrl( string $filePath, boolean $checkFile = false )

Thumbnail URL getter

Thumbnail URL getter

Parameters

$filePath
string
$filePath original file path
$checkFile
boolean
$checkFile OPTIONAL is it necessary to check file availability

Returns

string
| false
public boolean|string
# resizeFile( string $source, boolean $keepRation = true )

Create thumbnail for image and save it to thumbnails directory

Create thumbnail for image and save it to thumbnails directory

Parameters

$source
string
$source Image path to be resized
$keepRation
boolean
$keepRation Keep aspect ratio or not

Returns

boolean|string
Resized filepath or false if errors were occurred
public boolean|string
# resizeOnTheFly( string $filename )

Resize images on the fly in controller action

Resize images on the fly in controller action

Parameters

$filename
string
File basename

Returns

boolean|string
Thumbnail path or false for errors
public string
# getThumbsPath( string $filePath = false )

Return thumbnails directory path for file/current directory

Return thumbnails directory path for file/current directory

Parameters

$filePath
string
$filePath Path to the file

Returns

string
public Mage_Cms_Helper_Wysiwyg_Images
# getHelper( )

Media Storage Helper getter

Media Storage Helper getter

Returns

Mage_Cms_Helper_Wysiwyg_Images
public Mage_Adminhtml_Model_Session
# getSession( )

Storage session

Storage session

Returns

Mage_Adminhtml_Model_Session
public Mage_Core_Model_Config_Element
# getConfig( )

Config object getter

Config object getter

Returns

Mage_Core_Model_Config_Element
public array
# getConfigAsArray( )

Config object as array getter

Config object as array getter

Returns

array
public mixed
# getConfigData( string $key, mixed $default = false )

Wysiwyg Config reader

Wysiwyg Config reader

Parameters

$key
string
$key
$default
mixed
$default

Returns

mixed
public array
# getAllowedExtensions( string $type = null )

Prepare allowed_extensions config settings

Prepare allowed_extensions config settings

Parameters

$type
string
$type Type of storage, e.g. image, media etc.

Returns

array
Array of allowed file extensions
public string
# getThumbnailRoot( )

Thumbnail root directory getter

Thumbnail root directory getter

Returns

string
public boolean
# isImage( string $filename )

Simple way to check whether file is image or not based on extension

Simple way to check whether file is image or not based on extension

Parameters

$filename
string
$filename

Returns

boolean
Constants summary
string DIRECTORY_NAME_REGEXP '/^[a-z0-9\-\_]+$/si'
#
string THUMBS_DIRECTORY_NAME '.thumbs'
#
string THUMB_PLACEHOLDER_PATH_SUFFIX 'images/placeholder/thumbnail.jpg'
#
Properties summary
protected Mage_Core_Model_Config_Element $_config
#

Config object

Config object

protected array $_configAsArray
#

Config object as array

Config object as array

Magento 1.7.0.2 API documentation generated by ApiGen 2.8.0