Initializes this classes general category-related variables
542785
public function initialize($page, $contexts, $currentcat, $defaultcategory, $todelete, $addcontexts) {
        $lastlist = null;
        foreach ($contexts as $context){
            $this->editlists[$context->id] = new question_category_list('ul', '', true, $this->pageurl, $page, 'cpage', QUESTION_PAGE_LENGTH, $context);
            $this->editlists[$context->id]->lastlist =& $lastlist;
            if ($lastlist!== null){
                $lastlist->nextlist =& $this->editlists[$context->id];
            }
            $lastlist =& $this->editlists[$context->id];
        }

        $count = 1;
        $paged = false;
        foreach ($this->editlists as $key => $list){
            list($paged, $count) = $this->editlists[$key]->list_from_records($paged, $count);
        }
        $this->catform = new question_category_edit_form($this->pageurl, compact('contexts', 'currentcat'));
        if (!$currentcat){
            $this->catform->set_data(array('parent'=>$defaultcategory));
        }
    }
1156783
private function initFromGetVariables()
    {
        $key_orderby = $this->getLinkPrefix() . 'orderby';
        $key_orderbydir = $this->getLinkPrefix() . 'orderbydir';

        if (isset($_GET[$key_orderby]) && $_GET[$key_orderby] == $this->id) {
            $this->view->orderby_column = $this;

            if (isset($_GET[$key_orderbydir])) {
                $this->setDirectionByString($_GET[$key_orderbydir]);
            }
        }
    }
964051
public function init()
    {
        $this->load();

        if (!empty($this->registry[$this->section])) {
            throw new RegistryException(
                RegistryException::DUPLICATE_INITIATION_ATTEMPT_TEXT . '(section: ' . $this->section . ')',
                RegistryException::DUPLICATE_INITIATION_ATTEMPT_CODE
            );
        }

        $this->getDrupalCommonConnector()->variable_set($this->section, $this->registry[$this->section]);
    }
288322
private function initializeItemClasses(): void
    {
        if ($this->item['class']) {
            $classes = StringUtil::trimsplit(' ', $this->item['class']);
            foreach ($classes as $class) {
                $this->itemClass[] = $class;
            }

            if (in_array('trail', $this->itemClass)) {
                $this->itemClass[] = 'active';
            }
        }
    }
760936
def register_lists(self, category_lists, lists_init_kwargs=None, editor_init_kwargs=None):
        
        lists_init_kwargs = lists_init_kwargs or {}
        editor_init_kwargs = editor_init_kwargs or {}

        for lst in category_lists:
            if isinstance(lst, string_types):  # Spawn CategoryList object from base category alias.
                lst = self.list_cls(lst, **lists_init_kwargs)
            elif not isinstance(lst, CategoryList):
                raise SitecatsConfigurationError(
                    '`CategoryRequestHandler.register_lists()` accepts only '
                    '`CategoryList` objects or category aliases.'
                )

            if self._obj:
                lst.set_obj(self._obj)

            for name, val in lists_init_kwargs.items():  # Setting CategoryList attributes from kwargs.
                setattr(lst, name, val)

            lst.enable_editor(**editor_init_kwargs)

            self._lists[lst.get_id()] = lst
184500
private void initArrays() {
        if (data == null || picsize != data.length) {
            data = new int[picsize];
            magnitude = new int[picsize];

            xConv = new float[picsize];
            yConv = new float[picsize];
            xGradient = new float[picsize];
            yGradient = new float[picsize];
        }
    }
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);
    }
1347376
protected function init()
    {
        $this->addToStoreList('sorting', SortingListStore::class);
        $this->addToStoreList('category', ListByCategoryStore::class);
        $this->addToStoreList('brand', ListByBrandStore::class);
        $this->addToStoreList('active', ActiveListStore::class);
        $this->addToStoreList('promo_block', ListByPromoBlockStore::class);
    }
261761
def categories=(categories)
      raise TypeException unless categories.is_a?(Array)
      categories.each { |item|
        raise TypeException unless Category.all.include?(item)
        raise DuplicateElementException if @categories.include?(item)
        @categories.push(item)
      }
    end
648666
public function init()
    {

        // initialize the parend class
        parent::init();

        // initialize the prepared statements
        $this->categoryStmt =
            $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::CATEGORY));
    }
1328904
private void init(){
	
		if(!Annotation.isInheritedMapped(configuredClass))
			Error.classNotMapped(configuredClass);
		
		for (Class<?> classe :getClasses()){
			relationalManyToOneMapper.put(classe.getName(), new JMapper(configuredClass, classe,ChooseConfig.DESTINATION));
			relationalOneToManyMapper.put(classe.getName(), new JMapper(classe, configuredClass,ChooseConfig.SOURCE));
		}
	}
928562
private void initVariables() {
		if (this.currentWindow == null) {
			this.currentWindow = new int[this.windowSize];
		}

		if (this.classDistributions == null) {
			this.classDistributions = new long[this.getModelContext().classAttribute().numValues()];
		}
	}
88364
public function initNestedSetChildren()
    {
        $collectionClassName = \Attogram\SharedMedia\Orm\Map\CategoryTableMap::getTableMap()->getCollectionClassName();

        $this->collNestedSetChildren = new $collectionClassName;
        $this->collNestedSetChildren->setModel('\Attogram\SharedMedia\Orm\Category');
    }
1054970
protected void initialize() {
    this.initializeConfig();
    this.ok = true;
    this.qhead = 0;
    this.clauses = new LNGVector<>();
    this.learnts = new LNGVector<>();
    this.watches = new LNGVector<>();
    this.vars = new LNGVector<>();
    this.orderHeap = new LNGHeap(this);
    this.trail = new LNGIntVector();
    this.trailLim = new LNGIntVector();
    this.model = new LNGBooleanVector();
    this.conflict = new LNGIntVector();
    this.assumptions = new LNGIntVector();
    this.seen = new LNGBooleanVector();
    this.analyzeStack = new LNGIntVector();
    this.analyzeToClear = new LNGIntVector();
    this.analyzeBtLevel = 0;
    this.claInc = 1;
    this.simpDBAssigns = -1;
    this.simpDBProps = 0;
    this.clausesLiterals = 0;
    this.learntsLiterals = 0;
    this.name2idx = new TreeMap<>();
    this.idx2name = new TreeMap<>();
    this.canceledByHandler = false;
    if (this.config.proofGeneration) {
      this.pgOriginalClauses = new LNGVector<>();
      this.pgProof = new LNGVector<>();
    }
  }
859111
private static function init() {
        self::$huffmanLookup = self::huffmanLookupInit();
        self::$huffmanCodes = self::huffmanCodesInit();
        self::$huffmanLengths = self::huffmanLengthsInit();

        foreach (\array_column(self::TABLE, 0) as $index => $name) {
            if (isset(self::$indexMap[$name])) {
                continue;
            }

            self::$indexMap[$name] = $index + 1;
        }
    }
235528
def set_categories(self):
        """"""
        self.categories = []
        temp_categories = self.soup.findAll('category')
        for category in temp_categories:
            category_text = category.string
            self.categories.append(category_text)
163367
protected function initParentCategory()
    {
        if (!array_key_exists('parent_id', $this->arImportData)) {
            return;
        }

        $iParentID = array_get($this->arImportData, 'parent_id');
        array_forget($this->arImportData, 'parent_id');
        if (empty($iParentID)) {
            $this->obParentCategory = false;

            return;
        }

        //Find parent category
        $this->obParentCategory = Category::getByExternalID($iParentID)->first();
    }