Processes manufacturer category URLs
516497
protected function _seoSetManufacturerData()
    {
        // only when SEO id on and in front end
        if (\OxidEsales\Eshop\Core\Registry::getUtils()->seoIsActive() && !$this->isAdmin()) {
            $oEncoder = \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Application\Model\SeoEncoderManufacturer::class);

            // preparing root manufacturer category
            if ($this->_oRoot) {
                $oEncoder->getManufacturerUrl($this->_oRoot);
            }

            // encoding manufacturer category
            foreach ($this as $sVndId => $value) {
                $oEncoder->getManufacturerUrl($this->_aArray[$sVndId]);
            }
        }
    }
312333
function productCategoriesString()
    {
        $categories = $this->attribute( 'product_categories' );
        if ( !$categories )
        {
            $result = ezpI18n::tr( 'kernel/shop', 'Any' );
            return $result;
        }

        $categoriesNames = array();
        foreach ( $categories as $cat )
            $categoriesNames[] = $cat['name'];

        return join( ', ', $categoriesNames );
    }
315764
function urlize(worker, text) {
  if (!linkify.test(text)) return escape(text)
  var matches = linkify.match(text)
  var lastIndex = 0;
  var buf = []
  for (var i = 0, match; (match = matches[i++]); ) {
    buf.push(escape(text.slice(lastIndex, match.index)))
    var link = {tag: true, name: 'a',
                attrs: {href: match.url}, 
                value: escape(match.type === 'hashtag' ? match.text : truncateUrl(match.text))}
    if (match.type === 'hashtag') {
      link.attrs['class'] = 'p-category'
    }
    else {
      link.attrs.rel = 'nofollow'
      link.attrs.target = '_blank'
    }
    buf = buf.concat(tagBuffer(worker, link, true))
    lastIndex = match.lastIndex
  }
  buf.push(escape(text.slice(lastIndex)))
  debug('urlize', matches, buf)
  return buf.join('')
}
1348147
def urls(order_by: Optional[str] = None):
    """"""
    url_rules: List[Rule] = current_app.url_map._rules

    # sort the rules. by default they're sorted by priority,
    # ie in the order they were registered with the app
    if order_by == 'view':
        url_rules = sorted(url_rules, key=lambda rule: _get_rule_view(rule))
    elif order_by != 'priority':
        url_rules = sorted(url_rules, key=lambda rule: getattr(rule, order_by))

    headings = ('Method(s)', 'Rule', 'Endpoint', 'View', 'Options')
    print_table(headings,
                [(_get_http_methods(url_rule),
                  url_rule.rule if url_rule.strict_slashes
                                else url_rule.rule.rstrip('/') + '[/]',
                  url_rule.endpoint,
                  _get_rule_view(url_rule),
                  _format_rule_options(url_rule),
                  ) for url_rule in url_rules],
                ['<' if i > 0 else '>' for i, col in enumerate(headings)],
                primary_column_idx=1)
408727
def make_action category, name, defopts, opts = {}
      req = Net::HTTP::Post.new(
        category.nil? ? "#{API_URI.path}/#{name}" : "#{API_URI.path}/#{category}/#{name}"
      )
      form = get_form_data(defopts, opts)
      RegApi2.form_to_be_sent(req.path, form)

      req.set_form_data(form)
      res = http.request(req)

      handle_response(defopts, res)
    end
581616
public function loadManufacturerList()
    {
        $oBaseObject = $this->getBaseObject();

        $sFieldList = $oBaseObject->getSelectFields();
        $sViewName = $oBaseObject->getViewName();
        $this->getBaseObject()->setShowArticleCnt($this->_blShowManufacturerArticleCnt);

        $sWhere = '';
        if (!$this->isAdmin()) {
            $sWhere = $oBaseObject->getSqlActiveSnippet();
            $sWhere = $sWhere ? " where $sWhere and " : ' where ';
            $sWhere .= "{$sViewName}.oxtitle != '' ";
        }

        $sSelect = "select {$sFieldList} from {$sViewName} {$sWhere} order by {$sViewName}.oxtitle";
        $this->selectString($sSelect);
    }
539304
public function getManufacturerList()
    {
        $oManufacturerList = oxNew(\OxidEsales\Eshop\Application\Model\ManufacturerList::class);
        $oManufacturerList->loadManufacturerList();

        return $oManufacturerList;
    }
971888
private function _convertGetProductCategoriesForASIN($request) {

        $parameters = array();
        $parameters['Action'] = 'GetProductCategoriesForASIN';
        if ($request->isSetSellerId()) {
            $parameters['SellerId'] =  $request->getSellerId();
        }
        if ($request->isSetMWSAuthToken()) {
            $parameters['MWSAuthToken'] =  $request->getMWSAuthToken();
        }
        if ($request->isSetMarketplaceId()) {
            $parameters['MarketplaceId'] =  $request->getMarketplaceId();
        }
        if ($request->isSetASIN()) {
            $parameters['ASIN'] =  $request->getASIN();
        }

        return $parameters;
    }
1350553
def category_links(categories)
      base_dir = @context.registers[:site].config['category_dir']
      categories = categories.sort!.map do |category|
        category_dir = GenerateCategories.category_dir(base_dir, category)
        # Make sure the category directory begins with a slash.
        category_dir = "/#{category_dir}" unless category_dir =~ /^\//
        "<a class='category' href='#{category_dir}/'>#{category}</a>"
      end

      case categories.length
      when 0
        ""
      when 1
        categories[0].to_s
      else
        categories.join(', ')
      end
    end
672541
function process(advertiserData) {
  var snfBeacon = {};
  var data = advertiserData.manufacturerSpecificData.data;

  snfBeacon.type = 'SnS Motion';
  snfBeacon.timestamp = parseInt(pdu.reverseBytes(data.substr(2,8)),16);
  snfBeacon.temperature = parseInt(data.substr(10,2),16);
  if(snfBeacon.temperature > 127) {
    snfBeacon.temperature = 127 - snfBeacon.temperature;
  }
  snfBeacon.temperature = snfBeacon.temperature / 2;
  snfBeacon.temperature += (parseInt(data.substr(41,1),16)) / 4;
  snfBeacon.batteryVoltage = data.substr(12,2);
  snfBeacon.eventCounters = [];
  snfBeacon.eventCounters.push(data.substr(26,1) + data.substr(14,2));
  snfBeacon.eventCounters.push(data.substr(27,1) + data.substr(16,2));
  snfBeacon.eventCounters.push(data.substr(28,1) + data.substr(18,2));
  snfBeacon.eventCounters.push(data.substr(29,1) + data.substr(20,2));
  snfBeacon.eventCounters.push(data.substr(30,1) + data.substr(22,2));
  snfBeacon.eventCounters.push(data.substr(31,1) + data.substr(24,2));
  for(var cCounter = 0; cCounter < 6; cCounter++) {
    var hexStringCount = snfBeacon.eventCounters[cCounter];
    snfBeacon.eventCounters[cCounter] = parseInt(hexStringCount,16);
  }
  snfBeacon.accelerationX = parseInt((data.substr(32,2) +
                                      data.substr(38,1)), 16);
  snfBeacon.accelerationY = parseInt((data.substr(34,2) +
                                      data.substr(39,1)), 16);
  snfBeacon.accelerationZ = parseInt((data.substr(36,2) +
                                      data.substr(40,1)), 16);

  advertiserData.manufacturerSpecificData.snfBeacon = snfBeacon;
}
134493
def _netid_category_url(netid, category_codes):
    
    return "{0}/{1}/category/{2}".format(
        url_base(), netid,
        (','.join([str(n) for n in category_codes])
         if isinstance(category_codes, (list, tuple))
         else category_codes))
733456
def process_url(self, page_num, page_size, url):
        
        params = dict()
        if page_num is not None:
            url = re.sub('page=\d+', '', url)
            params['page'] = page_num
        if page_size is not None:
            url = re.sub('per_page=\d+', '', url)
            params['per_page'] = page_size
        return params, url
608038
def on_about_to_process(self, plugin, instance):
        """"""

        if instance is None:
            instance_item = self.data["models"]["item"].instances[0]
        else:
            instance_item = self.data["models"]["item"].instances[instance.id]

        plugin_item = self.data["models"]["item"].plugins[plugin.id]

        for section in self.data["models"]["item"].sections:
            if section.name == plugin_item.verb:
                section.isProcessing = True
            if section.name == instance_item.category:
                section.isProcessing = True

        instance_item.isProcessing = True
        plugin_item.isProcessing = True
1133126
def url_for(self, attr=None, filter_value=None,
            service_type=None, endpoint_type="publicURL",
            service_name=None, volume_service_name=None):
        """"""
        matching_endpoints = []
        # We don't always get a service catalog back ...
        if "serviceCatalog" not in self.catalog["access"]:
            return None

        # Full catalog ...
        catalog = self.catalog["access"]["serviceCatalog"]
        for service in catalog:
            if service.get("type") != service_type:
                continue
            endpoints = service["endpoints"]
            for endpoint in endpoints:
                if not filter_value or endpoint.get(attr) == filter_value:
                    endpoint["serviceName"] = service.get("name")
                    matching_endpoints.append(endpoint)

        if not matching_endpoints:
            raise exc.EndpointNotFound()
        elif len(matching_endpoints) > 1:
            raise exc.AmbiguousEndpoints(endpoints=matching_endpoints)
        else:
            return matching_endpoints[0][endpoint_type]
385167
def _build_url(self, shorten=True):
        """"""
        url_order = self._get_url_params(shorten=shorten)

        # For fast ratings, switch weekday and category in url
        if self.category != 'final':
            url_order[1], url_order[2] = url_order[2], url_order[1]
        self.url = URL_FORMAT.format(*url_order)
1179056
protected function _processRequest()
    {
        $utils = \OxidEsales\Eshop\Core\Registry::getUtils();

        // non admin, request is not empty and was not processed by seo engine
        if (!isSearchEngineUrl() && $utils->seoIsActive() && ($requestUrl = getRequestUrl())) {
            // fetching standard url and looking for it in seo table
            if ($this->_canRedirect() && ($redirectUrl = \OxidEsales\Eshop\Core\Registry::getSeoEncoder()->fetchSeoUrl($requestUrl))) {
                $utils->redirect(\OxidEsales\Eshop\Core\Registry::getConfig()->getCurrentShopUrl() . $redirectUrl, false, 301);
            } elseif (VIEW_INDEXSTATE_INDEX == $this->noIndex()) {
                // forcing to set no index/follow meta
                $this->_forceNoIndex();

                if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('blSeoLogging')) {
                    $shopId = \OxidEsales\Eshop\Core\Registry::getConfig()->getShopId();
                    $languageId = \OxidEsales\Eshop\Core\Registry::getLang()->getBaseLanguage();
                    $id = md5(strtolower($requestUrl) . $shopId . $languageId);

                    // logging "not found" url
                    $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
                    $database->execute(
                        "replace oxseologs ( oxstdurl, oxident, oxshopid, oxlang ) values ( ?, ?, ?, ? ) ",
                        [$requestUrl, $id, $shopId, $languageId]
                    );
                }
            }
        }
    }
227557
def category(self, category):
        
        self.url.category = category
        self.url.set_page(1)
        return self