Customized to get the ordered categories and entries from the Mixin.
161197
def get_queryset(self):
        
        self.queryset = super(EntryCategoryListView, self).get_queryset()
        return self.get_ordered_entries(self.queryset)
633518
private function InitCategoryArticles()
    {
        $sql = Access::SqlBuilder();
        $tblArticle = Article::Schema()->Table();
        $orderBy = $sql->OrderList($sql->OrderDesc($tblArticle->Field('Created')));
        $where = $this->PublishedCondition()->
                And_($sql->Equals($tblArticle->Field('Category'), 
                        $sql->Value($this->category->GetID())));
        $this->articles = Article::Schema()->Fetch(false, $where, $orderBy);
        $this->articlesTotal = Article::Schema()->Count(false, $where);
    }
1363187
def get_context_data(self, **kwargs):
        
        context = super(BaseCategoryDetail, self).get_context_data(**kwargs)
        context['category'] = self.category
        return context
528062
def ordered_dirs(self):
        
        return [item[0] for item in sorted(
            self.byte_contents.items(), key=lambda entry: entry[1].st_ino)]
374633
def _GetParsersFromPresetCategory(cls, category):
    
    preset_definition = cls._presets.GetPresetByName(category)
    if preset_definition is None:
      return []

    preset_names = cls._presets.GetNames()
    parser_names = set()

    for element_name in preset_definition.parsers:
      if element_name in preset_names:
        category_parser_names = cls._GetParsersFromPresetCategory(element_name)
        parser_names.update(category_parser_names)
      else:
        parser_names.add(element_name)

    return sorted(parser_names)
68925
function getPresets(category) {
    const categoryConfig = configs.find(conf => conf.name === category)
    if (!categoryConfig) {
        return []
    }

    const presets = [categoryConfig.configId]
    const subTargets = configs.filter(conf =>
        conf.extends.find(ext => ext.name === category)
    )
    for (const sub of subTargets) {
        for (const name of getPresets(sub.name)) {
            presets.push(name)
        }
    }
    return presets
}
607044
def get_categories(self):
        
        posts = self.get_posts(include_draft=True)
        result = {}
        for post in posts:
            for category_name in set(post.categories):
                result[category_name] = result.setdefault(
                    category_name,
                    Pair(0, 0)) + Pair(1, 0 if post.is_draft else 1)
        return list(result.items())
570705
public function getMixins()
    {
        if(!isset($this->getConfig()->mixins)) {
            $this->getConfig()->append(array('mixins' => array()));
        }

        return $this->getConfig()->mixins;
    }
510306
def _prepare_order_bys(self):
        
        order_bys = OrderedSet()
        if self._order_bys:
            for ingredient in self._order_bys:
                if isinstance(ingredient, Dimension):
                    # Reverse the ordering columns so that dimensions
                    # order by their label rather than their id
                    columns = reversed(ingredient.columns)
                else:
                    columns = ingredient.columns
                for c in columns:
                    order_by = c.desc() if ingredient.ordering == 'desc' else c
                    if str(order_by) not in [str(o) for o in order_bys]:
                        order_bys.add(order_by)

        return list(order_bys)
553678
def getAnalysisCategories(self):
        
        bsc = getToolByName(self, 'bika_setup_catalog')
        cats = bsc(portal_type='AnalysisCategory', is_active=True)
        items = [(o.UID, o.Title) for o in cats]
        o = self.getCategory()
        if o and o.UID() not in [i[0] for i in items]:
            items.append((o.UID(), o.Title()))
        items.sort(lambda x, y: cmp(x[1], y[1]))
        return DisplayList(list(items))
33065
private function getCategory()
    {
        $category = $this->loadCategory();

        $this->addVirtualCategoryData($category)
            ->addSelectedProducts($category)
            ->setSortedProducts($category);

        return $category;
    }
971923
function() {
            var categories = { "": 1 };
            for (var i in this.registered_node_types) {
                if (
                    this.registered_node_types[i].category &&
                    !this.registered_node_types[i].skip_list
                ) {
                    categories[this.registered_node_types[i].category] = 1;
                }
            }
            var result = [];
            for (var i in categories) {
                result.push(i);
            }
            return result;
        }
543293
def _get_mixins_(bases):
        
        if not bases or Enum is None:
            return object, Enum


        # double check that we are not subclassing a class with existing
        # enumeration members; while we're at it, see if any other data
        # type has been mixed in so we can use the correct __new__
        member_type = first_enum = None
        for base in bases:
            if  (base is not Enum and
                    issubclass(base, Enum) and
                    base._member_names_):
                raise TypeError("Cannot extend enumerations")
        # base is now the last base in bases
        if not issubclass(base, Enum):
            raise TypeError("new enumerations must be created as "
                    "`ClassName([mixin_type,] enum_type)`")

        # get correct mix-in type (either mix-in type of Enum subclass, or
        # first base if last base is Enum)
        if not issubclass(bases[0], Enum):
            member_type = bases[0]     # first data type
            first_enum = bases[-1]  # enum type
        else:
            for base in bases[0].__mro__:
                # most common: (IntEnum, int, Enum, object)
                # possible:    (<Enum 'AutoIntEnum'>, <Enum 'IntEnum'>,
                #               <class 'int'>, <Enum 'Enum'>,
                #               <class 'object'>)
                if issubclass(base, Enum):
                    if first_enum is None:
                        first_enum = base
                else:
                    if member_type is None:
                        member_type = base

        return member_type, first_enum
388007
def get_context_data(self, **kwargs):
        """"""
        data = super(MetricsListView, self).get_context_data(**kwargs)

        # Metrics organized by category, like so:
        # { <category_name>: [ <slug1>, <slug2>, ... ]}
        data.update({'metrics': get_r().metric_slugs_by_category()})
        return data
526462
def get_category_lists(self, init_kwargs=None, additional_parents_aliases=None):
        

        if self._category_editor is not None:  # Return editor lists instead of plain lists if it's enabled.
            return self._category_editor.get_lists()

        from .toolbox import get_category_lists
        init_kwargs = init_kwargs or {}

        catlist_kwargs = {}
        if self._category_lists_init_kwargs is not None:
            catlist_kwargs.update(self._category_lists_init_kwargs)
        catlist_kwargs.update(init_kwargs)

        lists = get_category_lists(catlist_kwargs, additional_parents_aliases, obj=self)

        return lists
704805
def get_context_data(self, **kwargs):
        """"""
        r = get_r()
        category = kwargs.pop('category', None)
        data = super(AggregateDetailView, self).get_context_data(**kwargs)

        if category:
            slug_set =   r._category_slugs(category)
        else:
            slug_set = set(kwargs['slugs'].split('+'))

        data['granularities'] = list(r._granularities())
        data['slugs'] = slug_set
        data['category'] = category
        return data
1174482
def get_context_data(self, **kwargs):
        
        kwargs.update({
            'entries': Entry.objects.get_for_tag(
                self.kwargs.get('slug', 0)
            )
        })

        return super(EntriesView, self).get_context_data(**kwargs)