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


PHP ConfigInterface::isSetFlag方法代码示例

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


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

示例1: getFeedUrl

 /**
  * Retrieve feed url
  *
  * @return string
  */
 public function getFeedUrl()
 {
     $httpPath = $this->_backendConfig->isSetFlag(self::XML_USE_HTTPS_PATH) ? 'https://' : 'http://';
     if (is_null($this->_feedUrl)) {
         $this->_feedUrl = $httpPath . $this->_backendConfig->getValue(self::XML_FEED_URL_PATH);
     }
     return $this->_feedUrl;
 }
开发者ID:aiesh,项目名称:magento2,代码行数:13,代码来源:Feed.php

示例2: authenticate

    /**
     * Authenticate user name and password and save loaded record
     *
     * @param string $username
     * @param string $password
     * @return bool
     * @throws \Magento\Framework\Exception\LocalizedException
     */
    public function authenticate($username, $password)
    {
        $config = $this->_config->isSetFlag('admin/security/use_case_sensitive_login');
        $result = false;

        try {
            $this->_eventManager->dispatch(
                'admin_user_authenticate_before',
                ['username' => $username, 'user' => $this]
            );
            $this->loadByUsername($username);
            $sensitive = $config ? $username == $this->getUsername() : true;
            if ($sensitive && $this->getId()) {
                $result = $this->verifyIdentity($password);
            }

            $this->_eventManager->dispatch(
                'admin_user_authenticate_after',
                ['username' => $username, 'password' => $password, 'user' => $this, 'result' => $result]
            );
        } catch (\Magento\Framework\Exception\LocalizedException $e) {
            $this->unsetData();
            throw $e;
        }

        if (!$result) {
            $this->unsetData();
        }
        return $result;
    }
开发者ID:razbakov,项目名称:magento2,代码行数:38,代码来源:User.php

示例3: getRefreshUrl

 /**
  * Returns URL to controller action which returns new captcha image
  *
  * @return string
  */
 public function getRefreshUrl()
 {
     return $this->_url->getUrl('adminhtml/refresh/refresh', ['_secure' => $this->_config->isSetFlag('web/secure/use_in_adminhtml'), '_nosecret' => true]);
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:9,代码来源:DefaultCaptcha.php

示例4: isActive

 /**
  * {@inheritdoc}
  */
 public function isActive($scope = null)
 {
     return $this->config->isSetFlag('dev/translate_inline/active_admin');
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:7,代码来源:Config.php

示例5: shouldBeSecure

 /**
  * {@inheritdoc}
  *
  * @param string $path
  * @return bool
  */
 public function shouldBeSecure($path)
 {
     return parse_url((string) $this->coreConfig->getValue(Store::XML_PATH_UNSECURE_BASE_URL, 'default'), PHP_URL_SCHEME) === 'https' || $this->backendConfig->isSetFlag(Store::XML_PATH_SECURE_IN_ADMINHTML) && parse_url((string) $this->coreConfig->getValue(Store::XML_PATH_SECURE_BASE_URL, 'default'), PHP_URL_SCHEME) === 'https';
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:10,代码来源:AdminPathConfig.php

示例6: _shouldBeSecure

 /**
  * Check whether URL for corresponding path should use https protocol
  *
  * @param string $path
  * @return bool
  * @SuppressWarnings(PHPMD.UnusedFormalParameter)
  */
 protected function _shouldBeSecure($path)
 {
     return substr((string) $this->_coreConfig->getValue('web/unsecure/base_url', 'default'), 0, 5) === 'https' || $this->_backendConfig->isSetFlag('web/secure/use_in_adminhtml') && substr((string) $this->_coreConfig->getValue('web/secure/base_url', 'default'), 0, 5) === 'https';
 }
开发者ID:shabbirvividads,项目名称:magento2,代码行数:11,代码来源:Router.php

示例7: authenticate

 /**
  * Authenticate user name and password and save loaded record
  *
  * @param string $username
  * @param string $password
  * @return bool
  * @throws \Magento\Framework\Model\Exception
  * @throws \Magento\Backend\Model\Auth\Exception
  * @throws \Magento\Backend\Model\Auth\Plugin\Exception
  */
 public function authenticate($username, $password)
 {
     $config = $this->_config->isSetFlag('admin/security/use_case_sensitive_login');
     $result = false;
     try {
         $this->_eventManager->dispatch('admin_user_authenticate_before', array('username' => $username, 'user' => $this));
         $this->loadByUsername($username);
         $sensitive = $config ? $username == $this->getUsername() : true;
         if ($sensitive && $this->getId() && $this->_encryptor->validateHash($password, $this->getPassword())) {
             if ($this->getIsActive() != '1') {
                 throw new \Magento\Backend\Model\Auth\Exception(__('This account is inactive.'));
             }
             if (!$this->hasAssigned2Role($this->getId())) {
                 throw new \Magento\Backend\Model\Auth\Exception(__('Access denied.'));
             }
             $result = true;
         }
         $this->_eventManager->dispatch('admin_user_authenticate_after', array('username' => $username, 'password' => $password, 'user' => $this, 'result' => $result));
     } catch (\Magento\Framework\Model\Exception $e) {
         $this->unsetData();
         throw $e;
     }
     if (!$result) {
         $this->unsetData();
     }
     return $result;
 }
开发者ID:pavelnovitsky,项目名称:magento2,代码行数:37,代码来源:User.php


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