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