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


PHP ConfigInterface::getValue方法代码示例

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


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

示例1: getFrontName

 /**
  * Retrieve area front name
  *
  * @return string
  */
 public function getFrontName()
 {
     $isCustomPathUsed = (bool) (string) $this->config->getValue(self::XML_PATH_USE_CUSTOM_ADMIN_PATH);
     if ($isCustomPathUsed) {
         return (string) $this->config->getValue(self::XML_PATH_CUSTOM_ADMIN_PATH);
     }
     return $this->defaultFrontName;
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:13,代码来源:FrontNameResolver.php

示例2: __construct

 public function __construct(\Magento\Backend\App\ConfigInterface $backendConfig, \Symfony\Component\Yaml\Parser $yamlParser, \Magento\Framework\Filesystem $filesystem, \Magento\Config\Model\Config\Factory $configFactory)
 {
     $this->_yamlParser = $yamlParser;
     $this->_backendConfig = $backendConfig;
     $this->_directory = $filesystem->getDirectoryWrite(DirectoryList::ROOT);
     $this->_folderLocation = str_replace('###MAGE_BASE###', $this->_getBaseDir(), $this->_backendConfig->getValue(self::XML_SYSTEM_PATH));
     $this->_configFactory = $configFactory;
 }
开发者ID:jzahedieh,项目名称:Magento2-FileConfigurator,代码行数:8,代码来源:Yaml.php

示例3: getFrontName

 /**
  * Retrieve area front name
  *
  * @param bool $checkHost If true, verify front name is valid for this url (hostname is correct)
  * @return string|bool
  */
 public function getFrontName($checkHost = false)
 {
     if ($checkHost && !$this->isHostBackend()) {
         return false;
     }
     $isCustomPathUsed = (bool)(string)$this->config->getValue(self::XML_PATH_USE_CUSTOM_ADMIN_PATH);
     if ($isCustomPathUsed) {
         return (string)$this->config->getValue(self::XML_PATH_CUSTOM_ADMIN_PATH);
     }
     return $this->defaultFrontName;
 }
开发者ID:razbakov,项目名称:magento2,代码行数:17,代码来源:FrontNameResolver.php

示例4: _canShowNotification

 /**
  * Check verification result and return true if system must to show notification message
  *
  * @return bool
  */
 private function _canShowNotification()
 {
     if ($this->_cache->load(self::VERIFICATION_RESULT_CACHE_KEY)) {
         return false;
     }
     if ($this->_isFileAccessible()) {
         return true;
     }
     $adminSessionLifetime = (int) $this->_backendConfig->getValue('admin/security/session_lifetime');
     $this->_cache->save(true, self::VERIFICATION_RESULT_CACHE_KEY, [], $adminSessionLifetime);
     return false;
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:17,代码来源:Security.php

示例5: sendPasswordResetNotificationEmail

 /**
  * Send email to when password is resetting
  *
  * @return $this
  */
 public function sendPasswordResetNotificationEmail()
 {
     $templateId = $this->_config->getValue(self::XML_PATH_RESET_PASSWORD_TEMPLATE);
     $transport = $this->_transportBuilder->setTemplateIdentifier($templateId)->setTemplateOptions(['area' => FrontNameResolver::AREA_CODE, 'store' => Store::DEFAULT_STORE_ID])->setTemplateVars(['user' => $this, 'store' => $this->_storeManager->getStore(Store::DEFAULT_STORE_ID)])->setFrom($this->_config->getValue(self::XML_PATH_FORGOT_EMAIL_IDENTITY))->addTo($this->getEmail(), $this->getName())->getTransport();
     $transport->sendMessage();
     return $this;
 }
开发者ID:vasiljok,项目名称:magento2,代码行数:12,代码来源:User.php

示例6: sendPasswordResetNotificationEmail

 /**
  * Send email to when password is resetting
  *
  * @return $this
  */
 public function sendPasswordResetNotificationEmail()
 {
     // Set all required params and send emails
     /** @var \Magento\Framework\Mail\TransportInterface $transport */
     $transport = $this->_transportBuilder->setTemplateIdentifier($this->_config->getValue(self::XML_PATH_RESET_PASSWORD_TEMPLATE))->setTemplateOptions(['area' => \Magento\Framework\App\Area::AREA_FRONTEND, 'store' => 0])->setTemplateVars(['user' => $this, 'store' => $this->_storeManager->getStore(0)])->setFrom($this->_config->getValue(self::XML_PATH_FORGOT_EMAIL_IDENTITY))->addTo($this->getEmail(), $this->getName())->getTransport();
     $transport->sendMessage();
     return $this;
 }
开发者ID:niranjanssiet,项目名称:magento2,代码行数:13,代码来源:User.php

示例7: sendUserNotificationEmail

 /**
  * Send user notification email
  *
  * @param string $changes
  * @param string $email
  * @return $this
  */
 protected function sendUserNotificationEmail($changes, $email = null)
 {
     if ($email === null) {
         $email = $this->getEmail();
     }
     $transport = $this->_transportBuilder->setTemplateIdentifier($this->_config->getValue(self::XML_PATH_USER_NOTIFICATION_TEMPLATE))->setTemplateModel('Magento\\Email\\Model\\BackendTemplate')->setTemplateOptions(['area' => FrontNameResolver::AREA_CODE, 'store' => Store::DEFAULT_STORE_ID])->setTemplateVars(['user' => $this, 'store' => $this->_storeManager->getStore(Store::DEFAULT_STORE_ID), 'changes' => $changes])->setFrom($this->_config->getValue(self::XML_PATH_FORGOT_EMAIL_IDENTITY))->addTo($email, $this->getName())->getTransport();
     $transport->sendMessage();
     return $this;
 }
开发者ID:BlackIkeEagle,项目名称:magento2-continuousphp,代码行数:16,代码来源:User.php

示例8: prolong

 /**
  * Set session UpdatedAt to current time and update cookie expiration time
  *
  * @return void
  */
 public function prolong()
 {
     $lifetime = $this->_config->getValue(self::XML_PATH_SESSION_LIFETIME);
     $currentTime = time();
     $this->setUpdatedAt($currentTime);
     $cookieValue = $this->_cookie->get($this->getName());
     if ($cookieValue) {
         $this->_cookie->set($this->getName(), $cookieValue, $lifetime, $this->sessionConfig->getCookiePath(), $this->sessionConfig->getCookieDomain(), $this->sessionConfig->getCookieSecure(), $this->sessionConfig->getCookieHttpOnly());
     }
 }
开发者ID:Atlis,项目名称:docker-magento2,代码行数:15,代码来源:Session.php

示例9: prolong

 /**
  * Set session UpdatedAt to current time and update cookie expiration time
  *
  * @return void
  */
 public function prolong()
 {
     $lifetime = $this->_config->getValue(self::XML_PATH_SESSION_LIFETIME);
     $currentTime = time();
     $this->setUpdatedAt($currentTime);
     $cookieValue = $this->cookieManager->getCookie($this->getName());
     if ($cookieValue) {
         $cookieMetadata = $this->cookieMetadataFactory->createPublicCookieMetadata()->setDuration($lifetime)->setPath($this->sessionConfig->getCookiePath())->setDomain($this->sessionConfig->getCookieDomain())->setSecure($this->sessionConfig->getCookieSecure())->setHttpOnly($this->sessionConfig->getCookieHttpOnly());
         $this->cookieManager->setPublicCookie($this->getName(), $cookieValue, $cookieMetadata);
     }
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:16,代码来源:Session.php

示例10: isLoggedIn

 /**
  * Check if user is logged in
  *
  * @return boolean
  */
 public function isLoggedIn()
 {
     $lifetime = $this->_config->getValue(self::XML_PATH_SESSION_LIFETIME);
     $currentTime = time();
     /* Validate admin session lifetime that should be more than 60 seconds */
     if ($lifetime >= 60 && $this->getUpdatedAt() < $currentTime - $lifetime) {
         return false;
     }
     if ($this->getUser() && $this->getUser()->getId()) {
         return true;
     }
     return false;
 }
开发者ID:BlackIkeEagle,项目名称:magento2-continuousphp,代码行数:18,代码来源:Session.php

示例11: __construct

 /**
  * @param \Magento\Framework\App\Helper\Context $context
  * @param \Magento\Framework\Registry $coreRegistry
  * @param \Magento\Framework\ObjectManager\ConfigInterface $config
  */
 public function __construct(\Magento\Framework\App\Helper\Context $context, \Magento\Framework\Registry $coreRegistry, \Magento\Framework\ObjectManager\ConfigInterface $config, \Magento\Backend\App\ConfigInterface $backendConfig, \Magento\Framework\Module\ModuleListInterface $moduleList, \Magento\Framework\Module\ResourceInterface $moduleResource, \Magento\Framework\Module\ModuleList\Loader $loader, \Magento\Framework\Xml\Parser $parser, \Magento\Framework\Filesystem\Driver\File $driver, \Magento\Framework\UrlInterface $urlBuilder, \Magento\Framework\App\ProductMetadataInterface $productMetadata, \Magento\Framework\ObjectManagerInterface $objectManager)
 {
     $this->_backendConfig = $backendConfig;
     $this->moduleList = $moduleList;
     $this->moduleResource = $moduleResource;
     $this->_loader = $loader;
     $this->parser = $parser;
     $this->driver = $driver;
     $this->_objectManager = $objectManager;
     $this->urlBuilder = $urlBuilder;
     $this->productMetadata = $productMetadata;
     $this->_allowedFeedType = explode(',', $backendConfig->getValue(\Ced\DevTool\Model\Feed::XML_FEED_TYPES));
     parent::__construct($context);
 }
开发者ID:dineshmalekar,项目名称:Magento2-Developer-Debug-Tool,代码行数:19,代码来源:Feed.php

示例12: getGeneralLocale

 /**
  * Get general interface locale 
  *
  * @return string
  */
 public function getGeneralLocale()
 {
     return $this->_backendConfig->getValue('general/locale/code');
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:9,代码来源:Manager.php

示例13: getResetPasswordLinkExpirationPeriod

 /**
  * Retrieve customer reset password link expiration period in days
  *
  * @return int
  */
 public function getResetPasswordLinkExpirationPeriod()
 {
     return (int) $this->_config->getValue(self::XML_PATH_ADMIN_RESET_PASSWORD_LINK_EXPIRATION_PERIOD);
 }
开发者ID:aiesh,项目名称:magento2,代码行数:9,代码来源:Data.php

示例14: getFrequency

 /**
  * Retrieve Update Frequency
  *
  * @return int
  */
 public function getFrequency()
 {
     return $this->_backendConfig->getValue(self::XML_FREQUENCY_PATH) * 3600;
 }
开发者ID:nja78,项目名称:magento2,代码行数:9,代码来源:Feed.php

示例15: getMaxFailures

 /**
  * Get admin maxiumum security failures from config
  *
  * @return int
  */
 public function getMaxFailures()
 {
     return (int) $this->backendConfig->getValue('admin/security/lockout_failures');
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:9,代码来源:ObserverConfig.php


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