Returns an array with the codes of the store views related with the passed website code.

@param string $websiteCode The code of the website to return the store view codes for

@return array The array with the matching store view codes
507568
public function getStoreViewCodesByWebsiteCode($websiteCode)
    {

        // query whether or not the website with the passed code exists
        if (!isset($this->storeWebsites[$websiteCode])) {
            // throw an exception if the website is NOT available
            throw new \Exception(
                $this->appendExceptionSuffix(
                    sprintf('Website with code "%s" is not available', $websiteCode)
                )
            );
        }

        // initialize the array for the store view codes
        $storeViewCodes = array();

        // load the website ID
        $websiteId = (integer) $this->storeWebsites[$websiteCode][MemberNames::WEBSITE_ID];

        // iterate over the available stores to find the one of the website
        foreach ($this->stores as $storeCode => $store) {
            if ((integer) $store[MemberNames::WEBSITE_ID] === $websiteId) {
                $storeViewCodes[] = $storeCode;
            }
        }

        // return the array with the matching store view codes
        return $storeViewCodes;
    }
774054
public function getProductLinkAttributeByLinkTypeCodeAndAttributeCode($linkTypeCode, $attributeCode)
    {

        // map the link type code => ID
        $linkTypeId = $this->mapLinkTypeCodeToLinkTypeId($linkTypeCode);

        // try to load the link attribute with the passed link type ID and attribute code
        foreach ($this->linkAttributes as $linkAttribute) {
            if ($linkAttribute[MemberNames::LINK_TYPE_ID] === $linkTypeId &&
                $linkAttribute[MemberNames::PRODUCT_LINK_ATTRIBUTE_CODE] === $attributeCode
            ) {
                // return the matching link attribute
                return $linkAttribute;
            }
        }
    }
1044207
public function getSurveysByCode($code)
    {
        $cacheId = __CLASS__ . '_' . __FUNCTION__ . '_' . $code;

        if ($results = $this->cache->load($cacheId)) {
            return $results;
        }

        $select = $this->db->select();
        $select->from('gems__surveys', array('gsu_id_survey', 'gsu_survey_name'))
                ->where("gsu_code = ?", $code)
                ->where("gsu_active = 1")
                ->order('gsu_survey_name');

        $results = $this->db->fetchPairs($select);
        $this->cache->save($results, $cacheId, array('surveys'));
        return $results;
    }
978018
public function getReceptionCode($code)
    {
        static $codes = array();

        if (! isset($codes[$code])) {
            $codes[$code] = $this->_loadClass('receptionCode', true, array($code));
        }

        return $codes[$code];
    }
1183505
public function getClassReflections($code)
    {
        $result = [];
        foreach ($this->getClassNames($code) as $className) {
            $result[$className] = new \ReflectionClass($className);
        }
        return $result;
    }
323464
public function get($attributeCode, array $context = null)
    {
        $attribute = $this->getAttribute($attributeCode);

        $getter = 'get'.ucfirst($attributeCode);
        if (method_exists($this, $getter)) {
            return $this->$getter($context);
        }

        if ($attribute->isCollection()) {
            return $this->getValuesData($attribute, $context);
        }

        return $this->getValueData($attribute, $context);
    }
9752
public function dirs($code=false){
    $all = $this->options->full_soptions(self::_dev_path());
    $cats = [];
    $r = [];
    foreach ( $all as $a ){
      if ( \defined($a['bbn_path']) ){
        $k = $a['bbn_path'] . '/' . ($a['code'] === '/' ? '' : $a['code']);
        if ( !isset($cats[$a['id_alias']]) ){
          unset($a['alias']['cfg']);
          $cats[$a['id_alias']] = $a['alias'];
        }
        unset($a['cfg']);
        unset($a['alias']);
        $r[$k] = $a;
        $r[$k]['title'] = $r[$k]['text'];
        $r[$k]['alias_code'] = $cats[$a['id_alias']]['code'];
        if ( !empty($cats[$a['id_alias']]['tabs']) ){
          $r[$k]['tabs'] = $cats[$a['id_alias']]['tabs'];
        }
        else{
          $r[$k]['extensions'] = $cats[$a['id_alias']]['extensions'];
        }
        unset($r[$k]['alias']);
      }
    }
    if ( $code ){
      return isset($r[$code]) ? $r[$code] : false;
    }
    return $r;
  }
868695
public function getScopeCode()
    {
        $scopeCode = $this->getData('scope_code');

        if ($scopeCode === null) {
            $scopeCode = 'default';
            if ($this->getStoreCode()) {
                $store = $this->_storeManager->getStore($this->getStoreCode());
                $scopeCode = $store->getId();
                if ($this->getContainerCode() && ($this->getContainerCode() != "")) {
                    $scopeCode = $this->getContainerCode() . "|" . $scopeCode;
                }
            } elseif ($this->getContainerCode()) {
                $scopeCode = $this->getContainerCode();
            }

            $this->setScopeCode($scopeCode);
        }

        return $scopeCode;
    }
702253
public function getPageParamList($sPageCode) : array
    {
        $arPageParamList = [];

        //Get URL params for categories
        $aCategoryParamList = $this->category->getPageParamList($sPageCode);
        $aBrandParamList = $this->brand->getPageParamList($sPageCode);

        //Get URL params for page
        $arParamList = (array) PageHelper::instance()->getUrlParamList($sPageCode, 'ProductPage');
        if (!empty($arParamList)) {
            $sPageParam = array_shift($arParamList);
            $arPageParamList[$sPageParam] = $this->slug;
        }

        $arPageParamList = array_merge($aCategoryParamList, $aBrandParamList, $arPageParamList);

        return $arPageParamList;
    }
388021
private function findView($code)
    {
        return isset($this->error_files[$code]) ? $this->error_files[$code] : $this->default_error_file;
    }
657179
private function getScopesByCode($scopeType)
    {
        $scopesByType = [];

        if ($scopeType == ScopeInterface::SCOPE_STORES) {
            $scopesByType = $this->storeManager->getStores(false, true);
        }

        if ($scopeType == ScopeInterface::SCOPE_WEBSITES) {
            $scopesByType = $this->storeManager->getWebsites(false, true);
        }

        return $scopesByType;
    }
136304
public static function getStatusIdList($statusCode)
    {
        if (! isset(self::$statusIdListsCache[$statusCode])) {
            $statusIdList = [];

            $statusList = OrderStatusQuery::create()->find();

            /** @var OrderStatus $status */
            foreach ($statusList as $status) {
                switch ($statusCode) {
                    case OrderStatus::CODE_NOT_PAID:
                        $match = $status->isNotPaid(false);
                        break;
                    case OrderStatus::CODE_PAID:
                        $match = $status->isPaid(false);
                        break;

                    case OrderStatus::CODE_PROCESSING:
                        $match = $status->isProcessing(false);
                        break;

                    case OrderStatus::CODE_SENT:
                        $match = $status->isSent(false);
                        break;
                    case OrderStatus::CODE_CANCELED:
                        $match = $status->isCancelled(false);
                        break;
                    case OrderStatus::CODE_REFUNDED:
                        $match = $status->isRefunded(false);
                        break;

                    default:
                        throw new InvalidArgumentException("Status code '$statusCode' is not a valid value.");
                }

                if ($match) {
                    $statusIdList[] = $status->getId();
                }
            }

            self::$statusIdListsCache[$statusCode] = $statusIdList;
        }

        return self::$statusIdListsCache[$statusCode];
    }
787169
public function getMatchingCodes()
    {
        $codes = [$this->getCode()];
        foreach ($this->getChildren() as $child) {
            /** @noinspection SlowArrayOperationsInLoopInspection */
            $codes = array_merge($codes, $child->getMatchingCodes());
        }

        return $codes;
    }
1300251
public function getWebsiteSalesDataFields($website)
    {
        $subscriberDataFileds = [
            'website_name' => '',
            'store_name' => '',
            'number_of_orders' => '',
            'average_order_value' => '',
            'total_spend' => '',
            'last_order_date' => '',
            'last_increment_id' => '',
            'most_pur_category' => '',
            'most_pur_brand' => '',
            'most_freq_pur_day' => '',
            'most_freq_pur_mon' => '',
            'first_category_pur' => '',
            'last_category_pur' => '',
            'first_brand_pur' => '',
            'last_brand_pur' => ''
        ];

        $store = $website->getDefaultStore();
        $mappedData = $this->scopeConfig->getValue(
            'connector_data_mapping/customer_data',
            \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
            $store->getId()
        );

        $mappedData = array_intersect_key($mappedData, $subscriberDataFileds);
        foreach ($mappedData as $key => $value) {
            if (!$value) {
                unset($mappedData[$key]);
            }
        }
        return $mappedData;
    }
1326326
public function get_lists($modulecode) {
        $modulecode = strtolower($modulecode);

        $lists = array();
        foreach ($this->_campus as $campus) {
            $result = $this->get_lists_for($modulecode, $campus);
            $lists = array_merge($lists, $result);
        }

        return $lists;
    }
1226396
public static function codeToCollection(string $code) {
		$tokens = token_get_all($code);
		//prr($tokens,1,1);
		$tokenCollection = [];
		foreach($tokens as $token) {
			$entity = new TokenEntity();
			if(is_array($token)) {
				$entity->type = $token[0];
				$entity->value = $token[1];
				$entity->line = $token[2];
			} else {
				$entity->type = 0;
				$entity->value = $token;
				//$entity->line = $token[2];
			}
			$tokenCollection[] = $entity;
		}
		return $tokenCollection;
	}
120909
public function create(string $code): array
    {
        $stmt = $this->parser->parse($code);
        return $this->traverser->traverse($stmt);
    }