Add a new TocElement to the TOC container.
666
def add_element(self, element):
        """"""
        try:
            self.toc[element.group][element.name] = element
        except KeyError:
            self.toc[element.group] = {}
            self.toc[element.group][element.name] = element
1274573
def add(self, element):
        """"""
        key = self._transform(element)
        if key not in self._elements:
            self._elements[key] = element
953650
public function addToc(\Enhavo\Bundle\ProjectBundle\Entity\Content $toc)
    {
        $toc->setMagazine($this);
        $this->toc[] = $toc;

        return $this;
    }
26339
def add(self, name, obj=None):
        """"""
        if obj:
            text = '\n::\n\n' + indent(str(obj))
        else:
            text = views.view(name, self.dstore)
        if text:
            title = self.title[name]
            line = '-' * len(title)
            self.text += '\n'.join(['\n\n' + title, line, text])
1241981
def _insert_contents(self, fzpage, newcont, overlay):
        """"""
        return _fitz.Tools__insert_contents(self, fzpage, newcont, overlay)
738901
public function addTo($to)
    {
        if (is_string($to)) {
            $this->_to[] = $to;
        } else {
            $this->_to = array_unique(array_merge($this->_to, $to));
        }
    }
367162
def add(self, name):
        '''
        
        '''
        if self.__current_section:
            self._flush_content()
        self.discard_current(name)
1306967
def new(self, event):
        """"""

        # Grid table handles interaction to code_array

        self.grid.actions.clear(event.shape)

        _grid_table = GridTable(self.grid, self.grid.code_array)
        self.grid.SetTable(_grid_table, True)

        # Update toolbars
        self.grid.update_entry_line()
        self.grid.update_attribute_toolbar()
1158873
def add(self, outputfilename, outputtemplate, inputfilename=None, inputtemplate=None):
        """"""
        if isinstance(outputtemplate,OutputTemplate):
            outputtemplate = outputtemplate.id
        if isinstance(inputtemplate,InputTemplate):
            inputtemplate = inputtemplate.id
        if outputfilename in self:
            outputtemplate, inputfiles = self[outputfilename]
            if inputfilename and inputtemplate:
                inputfiles[inputfilename] = inputtemplate
        else:
            if inputfilename and inputtemplate:
                self[outputfilename] = (outputtemplate, {inputfilename: inputtemplate})
            else:
                self[outputfilename] = (outputtemplate, {})
465498
public function setTo($to)
    {
        $attr = $this->createAttribute('to');
        $this->doc->appendChild($attr);
        $attr->appendChild($this->createTextNode($to));
    }
973129
function addNodeTo ( target, className ) {
        var div = document.createElement('div');
        addClass(div, className);
        target.appendChild(div);
        return div;
    }
1089512
def added(self, context):
        """"""
        context.ansi = ANSIFormatter(self._enable)
        context.aprint = context.ansi.aprint
466371
def add(self, item):
        """"""
        if item in self._set:
            self._fifo.remove(item)
        elif len(self._set) == self.max_items:
            self._set.remove(self._fifo.pop(0))
        self._fifo.append(item)
        self._set.add(item)
274333
public void addCell(TableCellBox cell)
    {
        if (cells == null) 
            organizeContent();
        cells.add(cell);
        cell.setOwnerRow(this);
    }
749819
private void organizeContent()
    {
        cells = new Vector<TableCellBox>();
        TableCellBox anoncell = null;
        
        int size = nested.size();
        List<Box> toremove = new ArrayList<Box>();
        for (int i = 0; i < size; i++)
        {
            Box box = nested.get(i);
            
            if (box instanceof TableCellBox)
            {
                addCell((TableCellBox) box);
                //finish and add possible previous anonymous cell
                if (anoncell != null)
                {
                    anoncell.endChild = anoncell.nested.size();
                    addSubBox(anoncell);
                }
                anoncell = null;
            }
            else
            {
                if (anoncell == null)
                {
                    Element anonelem = viewport.getFactory().createAnonymousElement(getParent().getParent().getParent().getElement().getOwnerDocument(), "td", "table-cell");
                    anoncell = new TableCellBox(anonelem, g, ctx);
                    anoncell.adoptParent(this);
                    anoncell.setStyle(viewport.getFactory().createAnonymousStyle("table-cell"));
                    addCell(anoncell);
                }
                anoncell.addSubBox(box);
                anoncell.isempty = false;
                if (box.isBlock()) anoncell.contblock = true;
                box.setContainingBlockBox(anoncell);
                box.setParent(anoncell);
                toremove.add(box);
                endChild--;
            }
        }
        nested.removeAll(toremove);
        
        if (anoncell != null)
        {
            anoncell.endChild = anoncell.nested.size();
            addSubBox(anoncell);
        }
    }
618670
private void addMode(CliMode mode, Class<?> annotatedClass) {

    CliModeContainer container = new CliModeContainer(mode, annotatedClass);
    addMode(container);
  }
325846
def p_toc(self, toc):
        ''''''
        toc[0] = TableOfContent(toc[1], toc[2], [])
        self.toc = toc[0]