當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。