本文整理汇总了PHP中Mage::objects方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage::objects方法的具体用法?PHP Mage::objects怎么用?PHP Mage::objects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage
的用法示例。
在下文中一共展示了Mage::objects方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getBlockModel
public function getBlockModel()
{
if (is_null($this->_cmsBlockObj)) {
$blockModel = Mage::getModel('cms/block');
$this->_cmsBlockObj = Mage::objects()->save($blockModel);
}
return Mage::objects()->load($this->_cmsBlockObj);
}
示例2: getPageModel
public function getPageModel()
{
if (is_null($this->_cmsPageObj)) {
$pageModel = Mage::getModel('cms/page');
$this->_cmsPageObj = Mage::objects()->save($pageModel);
}
return Mage::objects()->load($this->_cmsPageObj);
}
示例3: discard
/**
* Removes objects created in object cache
* Clears loaded data property
*
* @see EcomDev_PHPUnit_Model_Test_LoadableInterface::discard()
*/
public function discard()
{
foreach ($this->_dataObjectIds as $objectId) {
Mage::objects()->delete($objectId);
}
$this->_dataObjectIds = array();
$this->_loadedData = null;
return $this;
}
示例4: getNewsletterModel
/**
* Retrieve newsletter subscribers model cache
*
* @return Mage_Newsletter_Model_Subscriber
*/
public function getNewsletterModel()
{
if (is_null($this->_newsletterModel)) {
$object = Mage::getModel('newsletter/subscriber');
$this->_newsletterModel = Mage::objects()->save($object);
}
return Mage::objects()->load($this->_newsletterModel);
}
开发者ID:ankita-parashar,项目名称:magento,代码行数:13,代码来源:Intersec_Orderimportexport_Model_Convert_Parser_guest+orders_Exportorders.php
示例5: getProductModel
/**
* Retrieve product model cache
*
* @return Mage_Catalog_Model_Product
*/
public function getProductModel()
{
if (is_null($this->_productModel)) {
$productModel = Mage::getModel('catalog/product');
$this->_productModel = Mage::objects()->save($productModel);
}
return Mage::objects()->load($this->_productModel);
}
示例6: getStockItem
public function getStockItem()
{
return Mage::objects()->load(Mage::registry('Object_Cache_StockItem'));
}
示例7: __destruct
/**
* Object destructor removes
* created objects from object pool
*
*
*/
public function __destruct()
{
if (!empty($this->_createdObjectIds)) {
foreach ($this->_createdObjectIds as $objectId) {
Mage::objects()->delete($objectId);
}
}
}
示例8: getCustomer
public function getCustomer()
{
return Mage::objects()->load(Mage::registry('Object_Cache_Customer'));
}
示例9: getProductModel
/**
* Retrieve product model cache
*
* @return Mage_Catalog_Model_Product
*/
public function getProductModel()
{
/* if($type == 'simple'){
if (is_null($this->_productModel)) {
$productModel = Mage::getModel('catalog/productimport');
$this->_productModel = Mage::objects()->save($productModel);
}
return Mage::objects()->load($this->_productModel);
} else {
if (is_null($this->_productConfModel)) {
$productModel = Mage::getModel('catalog/productimport');
$this->_productConfModel = Mage::objects()->save($productModel);
}
return Mage::objects()->load($this->_productConfModel);
} */
if (is_null($this->_productModel)) {
$productModel = Mage::getModel('catalog/import_product');
$this->_productModel = Mage::objects()->save($productModel);
}
return Mage::objects()->load($this->_productModel);
}