Пример #1
0
 /**
  * @param Mage_Core_Model_Event_Manager $eventDispatcher
  * @param Mage_Core_Model_Cache $cacheManager
  * @param Mage_Core_Model_Resource_Abstract $resource
  * @param Varien_Data_Collection_Db $resourceCollection
  * @param Varien_Io_File $ioFile
  * @param Magento_ObjectManager $objectManager
  * @param array $data
  */
 public function __construct(Mage_Core_Model_Event_Manager $eventDispatcher, Mage_Core_Model_Cache $cacheManager, Varien_Io_File $ioFile, Magento_ObjectManager $objectManager, Mage_Core_Model_Resource_Abstract $resource = null, Varien_Data_Collection_Db $resourceCollection = null, array $data = array())
 {
     parent::__construct($eventDispatcher, $cacheManager, $resource, $resourceCollection, $data);
     $this->_ioFile = $ioFile;
     $this->_objectManager = $objectManager;
     $this->_design = $this->_objectManager->get('Mage_Core_Model_Design_Package');
 }
Пример #2
0
 public function __construct()
 {
     parent::__construct();
     $this->_smxUsername = Mage::getStoreConfig('smsconnexion_account_setup/account_group/smsconnexion_username');
     $this->_smxPassword = Mage::getStoreConfig('smsconnexion_account_setup/account_group/smsconnexion_password');
     $this->_smxSecret = Mage::getStoreConfig('smsconnexion_account_setup/account_group/smsconnexion_secret');
 }
Пример #3
0
 /**
  * Constructor.
  *
  * Sets up this Value Object.
  *
  * @param array $args the object data.
  */
 public function __construct(array $args)
 {
     parent::__construct();
     if (!isset($args['productId']) || empty($args['productId'])) {
         Mage::log(sprintf('%s.productId must have a value', __CLASS__), Zend_Log::WARN, Nosto_Tagging_Model_Base::LOG_FILE_NAME);
         $args['productId'] = '';
     }
     if (!isset($args['quantity']) || empty($args['quantity'])) {
         Mage::log(sprintf('%s.quantity must have a value', __CLASS__), Zend_Log::WARN, Nosto_Tagging_Model_Base::LOG_FILE_NAME);
         $args['quantity'] = '';
     }
     if (!isset($args['name']) || empty($args['name'])) {
         Mage::log(sprintf('%s.name must be a non-empty string value', __CLASS__), Zend_Log::WARN, Nosto_Tagging_Model_Base::LOG_FILE_NAME);
         $args['name'] = '';
     }
     if (!isset($args['unitPrice']) || empty($args['unitPrice'])) {
         Mage::log(sprintf('%s.unitPrice must have a value', __CLASS__), Zend_Log::WARN, Nosto_Tagging_Model_Base::LOG_FILE_NAME);
         $args['unitPrice'] = '';
     }
     if (!isset($args['currencyCode']) || empty($args['currencyCode'])) {
         Mage::log(sprintf('%s.currencyCode must be a numeric value', __CLASS__), Zend_Log::WARN, Nosto_Tagging_Model_Base::LOG_FILE_NAME);
         $args['currencyCode'] = '';
     }
     $this->_productId = $args['productId'];
     $this->_quantity = $args['quantity'];
     $this->_name = $args['name'];
     $this->_unitPrice = $args['unitPrice'];
     $this->_currencyCode = $args['currencyCode'];
 }
Пример #4
0
 /**
  * Constructor
  *
  * @param array $args
  */
 public function __construct(array $args = array())
 {
     $this->_factory = !empty($args['factory']) ? $args['factory'] : Mage::getSingleton('core/factory');
     $this->_eventPrefix = 'enterprise_url_rewrite';
     $this->_eventObject = 'url_rewrite';
     parent::__construct($args);
 }
Пример #5
0
 /**
  * Varien model constructor
  */
 public function __construct(Mage_Core_Model_Event_Manager $eventDispatcher, Mage_Core_Model_Cache $cacheManager, Mage_Tax_Helper_Data $taxHelper, Mage_Tax_Model_Class $taxClass, Mage_Core_Model_Resource_Abstract $resource = null, Varien_Data_Collection_Db $resourceCollection = null, array $data = array())
 {
     parent::__construct($eventDispatcher, $cacheManager, $resource, $resourceCollection, $data);
     $this->_init('Mage_Tax_Model_Resource_Calculation_Rule');
     $this->_helper = $taxHelper;
     $this->_taxClass = $taxClass;
 }
Пример #6
0
 public function __construct($params)
 {
     parent::__construct();
     !isset($params['childFolder']) && ($params['childFolder'] = NULL);
     $params['childFolder'] === '' && ($params['childFolder'] = NULL);
     if (Mage::helper('M2ePro/Magento')->isMagentoGoMode()) {
         $this->_pathVariablesDirBase = Mage::getBaseDir('media') . DS . self::BASE_NAME;
     } else {
         $this->_pathVariablesDirBase = Mage::getBaseDir('var') . DS . self::BASE_NAME;
     }
     if (!is_null($params['childFolder'])) {
         if ($params['childFolder'][0] != DS) {
             $params['childFolder'] = DS . $params['childFolder'];
         }
         if ($params['childFolder'][strlen($params['childFolder']) - 1] != DS) {
             $params['childFolder'] .= DS;
         }
         $this->_pathVariablesDirChildFolder = $this->_pathVariablesDirBase . $params['childFolder'];
         $this->_pathVariablesDirBase .= DS;
         $this->_childFolder = $params['childFolder'];
     } else {
         $this->_pathVariablesDirBase .= DS;
         $this->_pathVariablesDirChildFolder = $this->_pathVariablesDirBase;
         $this->_childFolder = '';
     }
     $this->_pathVariablesDirBase = str_replace(array('/', '\\'), DS, $this->_pathVariablesDirBase);
     $this->_pathVariablesDirChildFolder = str_replace(array('/', '\\'), DS, $this->_pathVariablesDirChildFolder);
     $this->_childFolder = str_replace(array('/', '\\'), DS, $this->_childFolder);
 }
Пример #7
0
 public function __construct(array $data = array())
 {
     $this->_httpHelper = !empty($data['http_helper']) ? $data['http_helper'] : Mage::helper('core/http');
     $this->_config = !empty($data['config']) ? $data['config'] : Mage::getConfig();
     $this->_logCondition = !empty($data['log_condition']) ? $data['log_condition'] : Mage::helper('log');
     $this->_session = !empty($data['session']) ? $data['session'] : Mage::getSingleton('core/session');
     parent::__construct($data);
 }
Пример #8
0
 /**
  * Initialize data
  *
  * @param array $data
  */
 public function __construct(Mage_Core_Model_Event_Manager $eventDispatcher, Mage_Core_Model_Cache $cacheManager, Mage_Core_Model_Resource_Abstract $resource = null, Varien_Data_Collection_Db $resourceCollection = null, array $data = array())
 {
     if (isset($data['helper'])) {
         $this->_helperInstance = $data['helper'];
         unset($data['helper']);
     }
     parent::__construct($eventDispatcher, $cacheManager, $resource, $resourceCollection, $data);
 }
Пример #9
0
 public function __construct()
 {
     parent::__construct();
     $this->settings = new Varien_Simplexml_Config();
     $this->settings->loadFile(Mage::getBaseDir() . $this->_file);
     if (!$this->settings) {
         throw new Exception('Can not read theme config file ' . Mage::getBaseDir() . $this->_file);
     }
 }
Пример #10
0
 /**
  * load theme xml
  */
 public function __construct()
 {
     parent::__construct();
     $filePath = Mage::getBaseDir() . '/app/code/local/Magik/Civicsettings/etc/civic.xml';
     $this->settings = new Varien_Simplexml_Config($filePath);
     if (!$this->settings || !is_readable($filePath)) {
         throw new Exception('Can not read theme config file ' . $filePath);
     }
 }
Пример #11
0
 /**
  * Constructor
  *
  * @param $arguments array
  */
 public function __construct($arguments)
 {
     if (!empty($arguments['factory'])) {
         $this->_factory = $arguments['factory'];
     } else {
         $this->_factory = Mage::getModel('mview/factory');
     }
     parent::__construct();
 }
Пример #12
0
 /**
  * @param Mage_Core_Model_Event_Manager $eventDispatcher
  * @param Mage_Core_Model_Cache $cacheManager
  * @param Magento_Filesystem $filesystem
  * @param Mage_Core_Model_Resource_Abstract $resource
  * @param Varien_Data_Collection_Db $resourceCollection
  * @param array $data
  */
 public function __construct(Mage_Core_Model_Event_Manager $eventDispatcher, Mage_Core_Model_Cache $cacheManager, Magento_Filesystem $filesystem, Mage_Core_Model_Resource_Abstract $resource = null, Varien_Data_Collection_Db $resourceCollection = null, array $data = array())
 {
     parent::__construct($eventDispatcher, $cacheManager, $resource, $resourceCollection, $data);
     $baseDir = Mage::getSingleton('Mage_Catalog_Model_Product_Media_Config')->getBaseMediaPath();
     $this->_filesystem = $filesystem;
     $this->_filesystem->setIsAllowCreateDirectories(true);
     $this->_filesystem->ensureDirectoryExists($baseDir);
     $this->_filesystem->setIsAllowCreateDirectories(false);
     $this->_filesystem->setWorkingDirectory($baseDir);
 }
 public function __construct($data = null)
 {
     if (is_array($data)) {
         if (isset($data['scope'])) {
             $this->_scope = $data['scope'];
             unset($data['scope']);
         }
     }
     parent::__construct($data);
 }
Пример #14
0
 public function __construct($params)
 {
     parent::__construct();
     if (!isset($params['nameFile']) || $params['nameFile'] === '') {
         throw new Exception('The name of log file is not specified.');
     }
     !isset($params['folder']) && ($params['folder'] = NULL);
     $params['folder'] === '' && ($params['folder'] = NULL);
     $this->_variablesDirModel = Mage::getModel('M2ePro/VariablesDir', array('childFolder' => $params['folder']));
     $this->_pathLogFile = $this->_variablesDirModel->getPath() . $params['nameFile'] . '.' . self::FILE_EXTENSION;
 }
Пример #15
0
 /**
  * Constructor
  */
 public function __construct()
 {
     $addressAttributes = Mage::getModel('customer/address')->getAttributes();
     foreach ($addressAttributes as $attr) {
         if (!$attr->getFrontendLabel()) {
             continue;
         }
         $this->_possibleChanges[$attr->getAttributeCode()] = $attr->getFrontendLabel();
     }
     return parent::__construct();
 }
Пример #16
0
 public function __construct()
 {
     $args = func_get_args();
     empty($args[0]) && ($args[0] = array());
     $params = $args[0];
     if (empty($params['orm'])) {
         throw new Exception('ORM for config is not defined.');
     }
     $this->_ormConfig = $params['orm'];
     parent::__construct();
 }
Пример #17
0
 public function __construct($params)
 {
     parent::__construct();
     if (!isset($params['nameLogFile']) || $params['nameLogFile'] === '') {
         throw new Exception('The name of log file is not specified.');
     }
     !isset($params['folderLogFile']) && ($params['folderLogFile'] = NULL);
     $params['folderLogFile'] === '' && ($params['folderLogFile'] = NULL);
     $this->_logFileModel = Mage::getModel('M2ePro/LogFile', array('nameFile' => $params['nameLogFile'], 'folder' => $params['folderLogFile']));
     $this->_printType = self::PRINT_TYPE_VAR_DUMP;
 }
Пример #18
0
 /**
  * Initialize data
  *
  * @param array $data
  */
 public function __construct(array $data = array())
 {
     if (isset($data['resource'])) {
         $this->_resource = $data['resource'];
         unset($data['resource']);
     }
     if (isset($data['helper'])) {
         $this->_helperInstance = $data['helper'];
         unset($data['helper']);
     }
     parent::__construct($data);
 }
Пример #19
0
 public function __construct()
 {
     // For export
     $this->exportFolder = Mage::getBaseDir('var') . DS . 'export' . DS . 'hporder';
     if (!is_dir($this->exportFolder)) {
         $tempFolder = Mage::getBaseDir('var') . DS . 'export';
         if (!is_dir($tempFolder)) {
             mkdir($tempFolder);
         }
         mkdir($this->exportFolder);
     }
     parent::__construct();
 }
Пример #20
0
 public function __construct()
 {
     parent::__construct();
     $websiteCode = Mage::app()->getRequest()->getParam('website', null);
     $storeCode = Mage::app()->getRequest()->getParam('store', null);
     $designPackage = Mage::helper('jmbasetheme')->getDesignPackage($storeCode, 'backend', $websiteCode);
     $this->_importSrc = Mage::getBaseDir("design") . DS . "frontend" . DS . $designPackage . DS . 'demo' . DS . 'data' . DS;
     $this->_styleSrc = Mage::getBaseDir("design") . DS . "frontend" . DS . $designPackage . DS . 'demo' . DS . 'styles' . DS;
     if (!is_dir($this->_importSrc)) {
         mkdir($this->_importSrc, 0775, true);
     }
     if (!is_dir($this->_styleSrc)) {
         mkdir($this->_styleSrc, 0775, true);
     }
 }
Пример #21
0
 /**
  * Constructor.
  *
  * Sets up this Value Object.
  *
  * @param array $args the object data.
  */
 public function __construct(array $args)
 {
     parent::__construct();
     if (!isset($args['firstName']) || !is_string($args['firstName'])) {
         Mage::log(sprintf('%s.firstName must be a string value', __CLASS__), Zend_Log::WARN, Nosto_Tagging_Model_Base::LOG_FILE_NAME);
         $args['firstName'] = '';
     }
     if (!isset($args['lastName']) || !is_string($args['lastName'])) {
         Mage::log(sprintf('%s.lastName must be a string value', __CLASS__), Zend_Log::WARN, Nosto_Tagging_Model_Base::LOG_FILE_NAME);
         $args['lastName'] = '';
     }
     if (!isset($args['email']) || !is_string($args['email'])) {
         Mage::log(sprintf('%s.email must be a string value', __CLASS__), Zend_Log::WARN, Nosto_Tagging_Model_Base::LOG_FILE_NAME);
         $args['email'] = '';
     }
     $this->_firstName = $args['firstName'];
     $this->_lastName = $args['lastName'];
     $this->_email = $args['email'];
 }
Пример #22
0
 /**
  * Constructor.
  *
  * Sets up this Value Object.
  *
  * @param array $args the object data.
  *
  */
 public function __construct(array $args)
 {
     parent::__construct();
     if (!isset($args['code']) || !is_string($args['code'])) {
         Mage::log(sprintf('%s.code must be a non-empty string value', __CLASS__), Zend_Log::WARN, Nosto_Tagging_Model_Base::LOG_FILE_NAME);
         $args['code'] = '';
     }
     if (!isset($args['label'])) {
         Mage::log(sprintf('%s.label is not set', __CLASS__), Zend_Log::WARN, Nosto_Tagging_Model_Base::LOG_FILE_NAME);
         $args['label'] = $args['code'];
     }
     if (isset($args['createdAt'])) {
         if (empty($args['createdAt'])) {
             Mage::log(sprintf('%s.createdAt is not set', __CLASS__), Zend_Log::WARN, Nosto_Tagging_Model_Base::LOG_FILE_NAME);
             $args['createdAt'] = '';
         }
     } else {
         $args['createdAt'] = '';
     }
     $this->_code = $args['code'];
     $this->_label = $args['label'];
     $this->_createdAt = $args['createdAt'];
 }
Пример #23
0
 public function __construct()
 {
     parent::__construct();
     $this->_importPath = Mage::getBaseDir() . '/app/code/local/Smartwave/Mango/etc/import/';
 }
Пример #24
0
 /**
  * Initialize tax helper
  *
  * @param array $args
  */
 public function __construct(array $args = array())
 {
     parent::__construct();
     $this->_taxHelper = !empty($args['helper']) ? $args['helper'] : Mage::helper('tax');
 }
Пример #25
0
 public function __construct()
 {
     parent::__construct();
 }
 /**
  * Constructor with parameters.
  *
  * Array of arguments with keys:
  *  - 'factory' Mage_Core_Model_Factory
  *  - 'app' Mage_Core_Model_App
  *
  * @param array $args
  */
 public function __construct(array $args = array())
 {
     $this->_factory = !empty($args['factory']) ? $args['factory'] : Mage::getSingleton('core/factory');
     $this->_app = !empty($args['app']) ? $args['app'] : Mage::app();
     unset($args['factory'], $args['app']);
     parent::__construct($args);
     $this->_init('enterprise_giftcardaccount/giftcardaccount');
 }
Пример #27
0
 /**
  * Initialize data
  *
  * @param Mage_Core_Model_Event_Manager $eventDispatcher
  * @param Mage_Core_Model_Cache $cacheManager
  * @param array $data
  */
 public function __construct(Mage_Core_Model_Event_Manager $eventDispatcher, Mage_Core_Model_Cache $cacheManager, array $data = array())
 {
     $this->_area = isset($data['area']) ? $data['area'] : null;
     $this->_store = isset($data['store']) ? $data['store'] : null;
     parent::__construct($eventDispatcher, $cacheManager, null, null, $data);
 }
Пример #28
0
 /**
  * Create path
  */
 public function __construct()
 {
     parent::__construct();
     $this->_importPath = Mage::getBaseDir() . '/app/code/local/Ves/Themesettings/etc/import/';
 }
 /**
  * Initialize cache tag
  */
 public function __construct()
 {
     $this->_cacheTag = 'banner';
     parent::__construct();
 }
Пример #30
0
 public function __construct()
 {
     $this->_init('pay_payment/optionsub');
     parent::__construct();
 }