当前位置: 首页>>代码示例>>PHP>>正文


PHP Mage_Core_Model_Website::getName方法代码示例

本文整理汇总了PHP中Mage_Core_Model_Website::getName方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Model_Website::getName方法的具体用法?PHP Mage_Core_Model_Website::getName怎么用?PHP Mage_Core_Model_Website::getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mage_Core_Model_Website的用法示例。


在下文中一共展示了Mage_Core_Model_Website::getName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testLoad

 public function testLoad()
 {
     /* Test loading by id */
     $this->assertEquals(1, $this->_model->getId());
     $this->assertEquals('base', $this->_model->getCode());
     $this->assertEquals('Main Website', $this->_model->getName());
     /* Test loading by code */
     $this->_model->load('admin');
     $this->assertEquals(0, $this->_model->getId());
     $this->assertEquals('admin', $this->_model->getCode());
     $this->assertEquals('Admin', $this->_model->getName());
 }
开发者ID:natxetee,项目名称:magento2,代码行数:12,代码来源:WebsiteTest.php

示例2: _addWebsiteFieldset

 /**
  * Method add website fieldset to the form.
  * @param Mage_Core_Model_Website $website
  */
 private function _addWebsiteFieldset($website, $form)
 {
     $prefixWeb = 'website-' . $website->getCode();
     /* make fieldset */
     $layoutFieldset = $form->addFieldset($prefixWeb . '_fieldset', array('legend' => Mage::helper('mturbo')->__($website->getName() . ' settings'), 'class' => 'fieldset'));
     /* add extra user control */
     $layoutFieldset->addType('html_element', Artio_MTurbo_Helper_Data::FORM_HTML);
     $layoutFieldset->addType('widget_button', Artio_MTurbo_Helper_Data::FORM_WIDGET_BUTTON);
     /* indicator whether website is enabled */
     $layoutFieldset->addField($prefixWeb . '-enabled', 'select', array('name' => $prefixWeb . '-enabled', 'label' => Mage::helper('mturbo')->__('Enable website') . ':', 'value' => '1', 'options' => array(0 => Mage::helper('mturbo')->__('No'), 1 => Mage::helper('mturbo')->__('Yes'))));
     /* add field for turbopath */
     $layoutFieldset->addField($prefixWeb . '-base_dir', 'text', array('name' => $prefixWeb . '-base_dir', 'value' => Mage::getBaseDir(), 'label' => Mage::helper('mturbo')->__('Base directory') . ':'));
     /* add field for server name */
     $layoutFieldset->addField($prefixWeb . '-server_name', 'text', array('name' => $prefixWeb . '-server_name', 'value' => Mage::helper('mturbo/website')->getServerName($website->getDefaultStore()->getCode()), 'label' => Mage::helper('mturbo')->__('Server name') . ':'));
     /* every store has one select determines whether enabled is */
     foreach ($website->getStores() as $store) {
         if ($store->getIsActive()) {
             $layoutFieldset->addField($prefixWeb . '-store-' . $store->getCode(), 'select', array('name' => $prefixWeb . '-store-' . $store->getCode(), 'label' => $store->getGroup()->getName() . '<br />' . $store->getName(), 'value' => '1', 'options' => array(0 => Mage::helper('mturbo')->__('No'), 1 => Mage::helper('mturbo')->__('Yes'))));
         }
     }
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:25,代码来源:Form.php

示例3: _addWebsiteFieldset

 /**
  * Method add website fieldset to the form.
  * @param Mage_Core_Model_Website $website
  */
 private function _addWebsiteFieldset($website)
 {
     $prefixWeb = 'website-' . $website->getCode();
     /* make fieldset */
     $layoutFieldset = $this->form->addFieldset($prefixWeb . '_fieldset', array('legend' => $this->getMyHelper()->__($website->getName() . ' settings'), 'class' => 'fieldset'));
     /* add extra user control */
     $layoutFieldset->addType('html_element', Artio_MTurbo_Helper_Data::FORM_HTML);
     $layoutFieldset->addType('widget_button', Artio_MTurbo_Helper_Data::FORM_WIDGET_BUTTON);
     /* indicator whether website is enabled */
     $layoutFieldset->addField($prefixWeb . '-enabled', 'select', array('name' => $prefixWeb . '-enabled', 'label' => $this->getMyHelper()->__('Enable website') . ':', 'options' => array(0 => $this->getMyHelper()->__('No'), 1 => $this->getMyHelper()->__('Yes'))));
     /* add field for base dir */
     $layoutFieldset->addField($prefixWeb . '-base_dir', 'text', array('name' => $prefixWeb . '-base_dir', 'label' => $this->getMyHelper()->__('Base directory') . ':'));
     /* add field for server name */
     $layoutFieldset->addField($prefixWeb . '-server_name', 'text', array('name' => $prefixWeb . '-server_name', 'label' => $this->getMyHelper()->__('Server name') . ':'));
     $layoutFieldset->addField($prefixWeb . '_dec1', 'html_element', array('label' => '<h4>' . $this->getMyHelper()->__('Enable/Disable Storeview') . '</h4>', 'code' => '<div style="height:10px;border-bottom:1px solid #808080"></div>'));
     /* every store has one select determines whether enabled is */
     foreach ($website->getStores() as $store) {
         if ($store->getIsActive()) {
             $layoutFieldset->addField($prefixWeb . '-store-' . $store->getCode(), 'select', array('name' => $prefixWeb . '-store-' . $store->getCode(), 'label' => $store->getGroup()->getName() . '<br />' . $store->getName(), 'options' => array(0 => $this->getMyHelper()->__('No'), 1 => $this->getMyHelper()->__('Yes'))));
         }
     }
     $layoutFieldset->addField($prefixWeb . '_dec2', 'html_element', array('label' => '<h4>' . $this->getMyHelper()->__('Htaccess settings') . '</h4>', 'code' => '<div style="height:10px;border-bottom:1px solid #808080"></div>'));
     /* get htaccess state and set color by it */
     $htaccess = Mage::getModel('mturbo/htaccess')->setWebsiteCode($website->getCode());
     $state = '';
     $pathToHtaccess = $htaccess->getPathToBaseHtaccess();
     $color = Mage::helper('mturbo/functions')->get_file_state($pathToHtaccess, $state, 'ew') ? 'green' : 'red';
     $layoutFieldset->addField($prefixWeb . '_dec3', 'html_element', array('label' => $this->getMyHelper()->__('File .htaccess path'), 'code' => '<span>' . $pathToHtaccess . '</span>'));
     $edit = $htaccess->isEditedByMTurbo() ? 'yes' : 'no';
     $layoutFieldset->addField($prefixWeb . '_dec5', 'html_element', array('label' => $this->getMyHelper()->__('Edited by MTurbo'), 'code' => '<span><b>' . $this->getMyHelper()->__($edit) . '</b></span>'));
     $layoutFieldset->addField($prefixWeb . '_dec4', 'html_element', array('label' => $this->getMyHelper()->__('File .htaccess state'), 'code' => '<span style="color:' . $color . '">' . $this->getMyHelper()->__($state) . '</span>'));
     /* button 'rebuild' show only if htaccess is ready */
     if ($color == 'green') {
         $layoutFieldset->addField($prefixWeb . '_htaccess_button', 'widget_button', array('name' => $prefixWeb . '_htaccess_button', 'label' => $this->getMyHelper()->__('Rebuild .htaccess for this website'), 'onclick' => "setLocation('" . Mage::helper('adminhtml')->getUrl('*/*/htaccessbuild', array('websitecode' => $website->getCode())) . "')"));
     }
     $layoutFieldset->addField($prefixWeb . '_urllist_button', 'widget_button', array('name' => $prefixWeb . '_urllist_button', 'label' => $this->getMyHelper()->__('Generate URL list for this website'), 'onclick' => "setLocation('" . Mage::helper('adminhtml')->getUrl('*/*/generateurllist', array('websitecode' => $website->getCode())) . "')"));
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:41,代码来源:Website.php

示例4: updateDataFields

 /**
  * update data fields
  *
  * @param $email
  * @param Mage_Core_Model_Website $website
  * @param $storeName
  */
 public function updateDataFields($email, Mage_Core_Model_Website $website, $storeName)
 {
     $data = array();
     if ($store_name = $website->getConfig(Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_CUSTOMER_STORE_NAME)) {
         $data[] = array('Key' => $store_name, 'Value' => $storeName);
     }
     if ($website_name = $website->getConfig(Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_CUSTOMER_WEBSITE_NAME)) {
         $data[] = array('Key' => $website_name, 'Value' => $website->getName());
     }
     if (!empty($data)) {
         //update data fields
         $client = $this->getWebsiteApiClient($website);
         $client->updateContactDatafieldsByEmail($email, $data);
     }
 }
开发者ID:vdimitrovv,项目名称:dotmailer-magento-extension,代码行数:22,代码来源:Data.php

示例5: formatWebsiteName

 /**
  * @param Mage_Core_Model_Website $website
  * @return string
  */
 public function formatWebsiteName(Mage_Core_Model_Website $website)
 {
     return $website->getName();
 }
开发者ID:netz98,项目名称:N98_ManageRules,代码行数:8,代码来源:Grid.php


注:本文中的Mage_Core_Model_Website::getName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。