本文整理汇总了PHP中Varien_Object::_construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Varien_Object::_construct方法的具体用法?PHP Varien_Object::_construct怎么用?PHP Varien_Object::_construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Varien_Object
的用法示例。
在下文中一共展示了Varien_Object::_construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _construct
public function _construct()
{
parent::_construct();
//$this->started_at = Mage::getSingleton('core/date')->timestamp(time());
$this->started_at = time();
$this->setData('cdate', $this->started_at);
}
示例2: _construct
public function _construct()
{
parent::_construct();
$this->method = Zend_Http_Client::GET;
$this->headers = array();
$this->response_model = Mage::getModel('klevu_search/api_response');
}
示例3: _construct
protected function _construct()
{
parent::_construct();
if (!$this->hasData('store_code')) {
$this->setData('store_code', Mage_Core_Model_Store::DEFAULT_CODE);
}
try {
Mage::app()->getStore($this->getData('store_code'));
} catch (Exception $e) {
Mage::throwException(sprintf('Store with code \'%s\' doesn\'t exists.', $this->getData('store_code')));
}
$this->setData('store_id', Mage::app()->getStore($this->getData('store_code'))->getStoreId());
$this->setData('website_id', Mage::app()->getStore($this->getData('store_code'))->getWebsiteId());
$this->setData('store_currency_code', Mage::app()->getStore($this->getData('store_code'))->getCurrentCurrencyCode());
// Initialize locks
$this->initSavePath();
$this->_storeLockFile = @fopen($this->getLockPath(), "w");
if (!file_exists($this->getLockPath())) {
Mage::throwException(sprintf('Can\'t create file %s', $this->getLockPath()));
}
// If the location is not writable, flock() does not work and it doesn't mean another script instance is running
if (!is_writable($this->getLockPath())) {
Mage::throwException(sprintf('Not enough permissions. Location [%s] must be writable', $this->getLockPath()));
}
}
示例4: _construct
public function _construct()
{
parent::_construct();
$options = array();
$names = array();
$code = false;
foreach ($this->getActiveFilters() as $filter) {
if (!$filter->getFilter()->getData('attribute_model')) {
continue;
}
if (is_object($filter->getFilter()->getAttributeModel())) {
$code = $filter->getFilter()->getAttributeModel()->getAttributeCode();
}
$name = $filter->getName();
$selected = $filter->getLabel();
if (!isset($options[$code])) {
$options[$code] = array();
}
$names[$code] = $name;
$options[$code][] = $selected;
}
$allOptions = array();
$allOptions2 = array();
foreach ($options as $code => $values) {
$this->setData($code, implode(', ', $values));
//
// if ($code == 'brand') {
// continue;
// }
$allOptions[] = $names[$code] . ': ' . implode(', ', $values);
$allOptions2[] = implode(', ', $values);
}
$this->setNamedSelectedOptions(implode(', ', $allOptions));
$this->setSelectedOptions(implode(', ', $allOptions2));
}
示例5: _construct
/**
* Varien_Object
*/
public function _construct()
{
parent::_construct();
$this->_recurrences = array();
$this->_product = null;
$this->_recurrency = null;
$this->_recurrencesData = array();
}
示例6: _construct
protected function _construct()
{
parent::_construct();
$this->initConfig();
if (!$this->getFromCustomGridXml()) {
$this->finalizeConfig();
}
}
示例7: _construct
public function _construct()
{
parent::_construct();
$page = Mage::app()->getRequest()->getParam('p');
if ($page > 1) {
$this->setPage(Mage::helper('seo')->__("Page %s", $page));
}
}
示例8: _construct
public function _construct()
{
parent::_construct();
$this->client = Mage::getSingleton('inchoo_socialconnect/linkedin_oauth2_client');
if (!$this->client->isEnabled()) {
return $this;
}
}
示例9: _construct
public function _construct()
{
parent::_construct();
$this->loadEntityType('catalog_product');
$attr_status = $this->getAttribute('status');
$this->setData('product_status_attribute_id', $attr_status->getAttributeId());
unset($attr_status);
}
示例10: _construct
protected function _construct()
{
parent::_construct();
if (!$this->hasData('store_code')) {
$this->setData('store_code', Mage_Core_Model_Store::DEFAULT_CODE);
}
try {
Mage::app()->getStore($this->getData('store_code'));
} catch (Exception $e) {
Mage::throwException(sprintf('Store with code \'%s\' doesn\'t exists.', $this->getData('store_code')));
}
$this->setData('store_id', Mage::app()->getStore($this->getData('store_code'))->getStoreId());
$this->setData('website_id', Mage::app()->getStore($this->getData('store_code'))->getWebsiteId());
}
示例11: _construct
/**
* Validate that the feed model has necessary configuration for the core
* feed model. Instantiate and store a core feed model using config data
* and optionally a fs_tool set in magic data.
*
* @throws EbayEnterprise_Eb2cCore_Exception_Feed_Configuration
* @return self
*/
protected function _construct()
{
parent::_construct();
$this->_logger = Mage::helper('ebayenterprise_magelog');
$this->_context = Mage::helper('ebayenterprise_magelog/context');
if (!$this->hasFeedConfig()) {
throw new EbayEnterprise_Eb2cCore_Exception_Feed_Configuration(__CLASS__ . ' no configuration specifed.');
}
// Set up local folders for receiving, processing
$coreFeedConstructorArgs = array('feed_config' => $this->getFeedConfig());
// FileSystem tool can be supplied, esp. for testing
if ($this->hasFsTool()) {
$coreFeedConstructorArgs['fs_tool'] = $this->getFsTool();
}
// Ready to set up the core feed helper, which manages files and directories:
$this->_coreFeed = Mage::getModel('ebayenterprise_catalog/feed_core', $coreFeedConstructorArgs);
return $this;
}
示例12:
/**
* Internal constructor not depended on params.
* It's used for application object initialization
*
* @return null
*/
final function _construct()
{
parent::_construct();
$this->setApplicationModel();
}
示例13: _construct
/**
* Init.
*/
public function _construct()
{
parent::_construct();
}
示例14: _construct
protected function _construct()
{
parent::_construct();
}
示例15: _construct
protected function _construct()
{
$this->_sizes = array('168x145' => array('label' => Mage::helper('affiliatepluswidget')->__('168x145 Single Product'), 'width' => 168, 'height' => 145, 'rows' => 1, 'columns' => 1), '300x250' => array('label' => Mage::helper('affiliatepluswidget')->__('300x250 Medium Rectangle'), 'width' => 300, 'height' => 250, 'rows' => 3, 'columns' => 2), '336x300' => array('label' => Mage::helper('affiliatepluswidget')->__('336x300 Large Rectangle'), 'width' => 336, 'height' => 300, 'rows' => 3, 'columns' => 2), '728x136' => array('label' => Mage::helper('affiliatepluswidget')->__('728x136 Wide Rectangle'), 'width' => 728, 'height' => 136, 'rows' => 1, 'columns' => 5), '728x175' => array('label' => Mage::helper('affiliatepluswidget')->__('728x175 Wide Rectangle Fully'), 'width' => 728, 'height' => 175, 'rows' => 1, 'columns' => 5), '160x450' => array('label' => Mage::helper('affiliatepluswidget')->__('160x450 Wide Skyscraper'), 'width' => 160, 'height' => 450, 'rows' => 6, 'columns' => 1), '160x600' => array('label' => Mage::helper('affiliatepluswidget')->__('160x600 Wide Skyscraper Fully'), 'width' => 160, 'height' => 600, 'rows' => 6, 'columns' => 1));
return parent::_construct();
}