Mage_Downloadable_Model_Sample Class Reference

Inheritance diagram for Mage_Downloadable_Model_Sample:

Mage_Core_Model_Abstract Varien_Object

List of all members.

Public Member Functions

 getUrl ()
 getSearchableData ($productId, $storeId)

Static Public Member Functions

static getSampleDir ()
static getBaseTmpPath ()
static getBasePath ()

Public Attributes

const XML_PATH_SAMPLES_TITLE = 'catalog/downloadable/samples_title'

Protected Member Functions

 _construct ()
 _afterSave ()


Detailed Description

Definition at line 34 of file Sample.php.


Member Function Documentation

_afterSave (  )  [protected]

After save process

Returns:
Mage_Downloadable_Model_Sample

Reimplemented from Mage_Core_Model_Abstract.

Definition at line 63 of file Sample.php.

00064     {
00065         $this->getResource()
00066             ->saveItemTitle($this);
00067         return parent::_afterSave();
00068     }

_construct (  )  [protected]

Initialize resource

Reimplemented from Varien_Object.

Definition at line 42 of file Sample.php.

00043     {
00044         $this->_init('downloadable/sample');
00045         parent::_construct();
00046     }

static getBasePath (  )  [static]

Retrieve sample files path

Returns:
string

Definition at line 99 of file Sample.php.

00100     {
00101         return Mage::getBaseDir('media') . DS . 'downloadable' . DS . 'files' . DS . 'samples';
00102     }

static getBaseTmpPath (  )  [static]

Retrieve base tmp path

Returns:
string

Definition at line 89 of file Sample.php.

00090     {
00091         return Mage::getBaseDir('media') . DS . 'downloadable' . DS . 'tmp' . DS . 'samples';
00092     }

static getSampleDir (  )  [static]

Return sample files path

Returns:
string

Definition at line 53 of file Sample.php.

00054     {
00055         return Mage::getBaseDir();
00056     }

getSearchableData ( productId,
storeId 
)

Retrieve links searchable data

Parameters:
int $productId
int $storeId
Returns:
array

Definition at line 111 of file Sample.php.

00112     {
00113         return $this->_getResource()
00114             ->getSearchableData($productId, $storeId);
00115     }

getUrl (  ) 

Retrieve sample URL

Returns:
string

Definition at line 75 of file Sample.php.

00076     {
00077         if ($this->getSampleUrl()) {
00078             return $this->getSampleUrl();
00079         } else {
00080             return $this->getSampleFile();
00081         }
00082     }


Member Data Documentation

const XML_PATH_SAMPLES_TITLE = 'catalog/downloadable/samples_title'

Definition at line 36 of file Sample.php.


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:09 2009 for Magento by  doxygen 1.5.8