für Component und Row
541802
public function getContentParts($content = null, $ignoreLinksWithClass = null)
    {
        $classes = $this->_classes;

        $usedChildComponentNrs = array();

        $componentId = $this->component_id;
        if (is_null($content)) $content = $this->content;

        $ret = array();
                            //1   2                 3                              4              5
        while (preg_match('#^(.*)(<img[^>]+src=[\n ]*"([^"]*)"[^>]*>|<a[^>]+href=[\n ]*"([^"]*)"[^>]*>)(.*)$#Usi', $content, $m)) {

            if ($m[1] != '') {
                $ret[] = $m[1];
            }

            if (isset($classes['image']) && $m[3] != ''
                && preg_match('#/media/([^/]+)/([^/]+)#', $m[3], $m2)) {
                //"/media/$class/$id/$rule/$type/$checksum/$filename.$extension$random"
                $isInvalid = false;
                $childComponentId = $m2[2];
                if (substr($childComponentId, 0, strlen($componentId)+2)
                            == $componentId.'-i') {
                    $nr = substr($childComponentId, strlen($componentId)+2);
                    if (!in_array('i'.$nr, $usedChildComponentNrs)) {
                        $usedChildComponentNrs[] = 'i'.$nr;
                        $ret[] = array('type'=>'image', 'nr'=>$nr, 'html'=>$m[2]);
                    } else {
                        $isInvalid = true;
                    }
                } else {
                    $isInvalid = true;
                }
                if ($isInvalid) {
                    $ret[] = array('type'=>'invalidImage',
                                    'src'=>$m[3],
                                    'componentClass'=>$m2[1],
                                    'componentId'=>$childComponentId,
                                    'html'=>$m[2]);
                }
            } else if (isset($classes['image']) && $m[3] != '') {
                $ret[] = array('type'=>'invalidImage', 'src'=>$m[3], 'html'=>$m[2]);
            } else if ($m[3] != '') {
                //kein image möglich
            }

            if ((isset($classes['link']) || isset($classes['download'])) && $m[4] != ''
                && preg_match('#/?([^/]+)$#', $m[4], $m2)) {

                $isInvalid = false;
                $childComponentId = $m2[1];
                if (isset($classes['link'])
                    && substr($childComponentId, 0, strlen($componentId)+2)
                            == $componentId.'-l') {
                    $nr = substr($childComponentId, strlen($componentId)+2);
                    if (!in_array('l'.$nr, $usedChildComponentNrs)) {
                        $usedChildComponentNrs[] = 'l'.$nr;
                        $ret[] = array('type'=>'link', 'nr'=>$nr, 'html'=>$m[2]);
                    } else {
                        $ret[] = $this->_checkIgnoreLinksWithClass(
                            $ignoreLinksWithClass,
                            array('type'=>'invalidLink', 'href'=>$m[4], 'componentId'=>$m2[1], 'html'=>$m[2])
                        );
                    }
                } else if (isset($classes['download'])
                        && substr($childComponentId, 0, strlen($componentId)+2)
                            == $componentId.'-d') {
                    $nr = substr($childComponentId, strlen($componentId)+2);
                    if (!in_array('d'.$nr, $usedChildComponentNrs)) {
                        $usedChildComponentNrs[] = 'd'.$nr;
                        $ret[] = array('type'=>'download', 'nr'=>$nr, 'html'=>$m[2]);
                    } else {
                        $ret[] = $this->_checkIgnoreLinksWithClass(
                            $ignoreLinksWithClass,
                            array('type'=>'invalidDownload', 'href'=>$m[4], 'componentId'=>$m2[1], 'html'=>$m[2])
                        );
                    }
                } else if (isset($classes['link']) && preg_match('#-l[0-9]+$#', $m2[1])) {
                    $ret[] = $this->_checkIgnoreLinksWithClass(
                        $ignoreLinksWithClass,
                        array('type'=>'invalidLink', 'href'=>$m[4], 'componentId'=>$m2[1], 'html'=>$m[2])
                    );
                } else if (isset($classes['download']) && preg_match('#-d[0-9]+$#', $m2[1])) {
                    $ret[] = $this->_checkIgnoreLinksWithClass(
                        $ignoreLinksWithClass,
                        array('type'=>'invalidDownload', 'href'=>$m[4], 'componentId'=>$m2[1], 'html'=>$m[2])
                    );
                } else {
                    $ret[] = $this->_checkIgnoreLinksWithClass(
                        $ignoreLinksWithClass,
                        array('type'=>'invalidLink', 'href'=>$m[4], 'html'=>$m[2])
                    );
                }
            } else if (isset($classes['link']) && $m[4] != '') {
                $ret[] = $this->_checkIgnoreLinksWithClass($ignoreLinksWithClass, array('type'=>'invalidLink', 'href'=>$m[4], 'html'=>$m[2]));
            } else if ($m[4] != '') {
                //kein link möglich
            }

            $content = $m[5];
        }
        if(!$m) $ret[] = $content;

        return $ret;
    }
325601
function position(row, rowFixedLength, rect, halfGapWidth, flush) {
    // When rowFixedLength === rect.width,
    // it is horizontal subdivision,
    // rowFixedLength is the width of the subdivision,
    // rowOtherLength is the height of the subdivision,
    // and nodes will be positioned from left to right.

    // wh[idx0WhenH] means: when horizontal,
    //      wh[idx0WhenH] => wh[0] => 'width'.
    //      xy[idx1WhenH] => xy[1] => 'y'.
    var idx0WhenH = rowFixedLength === rect.width ? 0 : 1;
    var idx1WhenH = 1 - idx0WhenH;
    var xy = ['x', 'y'];
    var wh = ['width', 'height'];

    var last = rect[xy[idx0WhenH]];
    var rowOtherLength = rowFixedLength
        ? row.area / rowFixedLength : 0;

    if (flush || rowOtherLength > rect[wh[idx1WhenH]]) {
        rowOtherLength = rect[wh[idx1WhenH]]; // over+underflow
    }
    for (var i = 0, rowLen = row.length; i < rowLen; i++) {
        var node = row[i];
        var nodeLayout = {};
        var step = rowOtherLength
            ? node.getLayout().area / rowOtherLength : 0;

        var wh1 = nodeLayout[wh[idx1WhenH]] = mathMax(rowOtherLength - 2 * halfGapWidth, 0);

        // We use Math.max/min to avoid negative width/height when considering gap width.
        var remain = rect[xy[idx0WhenH]] + rect[wh[idx0WhenH]] - last;
        var modWH = (i === rowLen - 1 || remain < step) ? remain : step;
        var wh0 = nodeLayout[wh[idx0WhenH]] = mathMax(modWH - 2 * halfGapWidth, 0);

        nodeLayout[xy[idx1WhenH]] = rect[xy[idx1WhenH]] + mathMin(halfGapWidth, wh1 / 2);
        nodeLayout[xy[idx0WhenH]] = last + mathMin(halfGapWidth, wh0 / 2);

        last += modWH;
        node.setLayout(nodeLayout, true);
    }

    rect[xy[idx1WhenH]] += rowOtherLength;
    rect[wh[idx1WhenH]] -= rowOtherLength;
}
526184
def top(n, width=WIDTH, style=STYLE):
    """"""
    return hrule(n, width, linestyle=STYLES[style].top)
1110952
def define_layout
      super do |components|
        components << Scruffy::Components::Title.new(:title, :position => [5, 2], :size => [90, 7])
                      
        VIEWPORTS.each_pair do |category, position|
          components << Scruffy::Components::Viewport.new(category, :position => position, 
                                                          :size => VIEWPORT_SIZE, &graph_block(category))
        end

        components << Scruffy::Components::Legend.new(:legend, :position => [5, 13], :size => [90, 5])
      end
    end
843494
function embed(mat, rows, cols) {
                            var r = mat.rows;
                            var c = mat.columns;
                            if ((r === rows) && (c === cols)) {
                                return mat;
                            } else {
                                var resultat = Matrix.zeros(rows, cols);
                                resultat = resultat.setSubMatrix(mat, 0, 0);
                                return resultat;
                            }
                        }
563861
function bootstrap(item, prop, path) {
  if ( (path.split('node_modules').length > 2) || (path.slice(-4) == 'emit') || (item == require('util') && (prop=='format')) ) return;
  if (!item.hasOwnProperty(prop) || Object.getOwnPropertyDescriptor(item, prop).get) return;
  var original = item[prop];
  if (allFuncs.indexOf(original) !== -1) return;
  allFuncs.push(original);
  if (item[prop] instanceof Function) {
    infect(item, prop, path);
    if (item[prop].prototype) {
      bootstrap(item[prop], 'prototype', path+'.prototype');
    }
    for (var i in original) {
      if (!original.hasOwnProperty(i) || Object.getOwnPropertyDescriptor(original, i).get) return;
      item[prop][i] = original[i];
    }
  }
  if (item[prop] instanceof Object) {
    for (var i in item[prop]) {
      bootstrap(item[prop], i, path+'.'+i);
    }
  }
  return item;
}
1354301
function (targetNode, layoutParam, textStyleModel) {
        for (var node = targetNode; node; node = node.parentNode) {
            var text = node.getModel().get('name');
            var textRect = textStyleModel.getTextRect(text);
            var itemWidth = Math.max(
                textRect.width + TEXT_PADDING * 2,
                layoutParam.emptyItemWidth
            );
            layoutParam.totalWidth += itemWidth + ITEM_GAP;
            layoutParam.renderList.push({node: node, text: text, width: itemWidth});
        }
    }
836789
private Border getBorder(int row, int column)
    {
        if (row % 3 == 2)
        {
            switch (column % 3)
            {
                case 2: return BOTTOM_RIGHT_BORDER;
                case 0: return BOTTOM_LEFT_BORDER;
                default: return BOTTOM_BORDER;
            }
        }
        else if (row % 3 == 0)
        {
            switch (column % 3)
            {
                case 2: return TOP_RIGHT_BORDER;
                case 0: return TOP_LEFT_BORDER;
                default: return TOP_BORDER;
            }
        }

        switch (column % 3)
        {
            case 2: return RIGHT_BORDER;
            case 0: return LEFT_BORDER;
            default: return null;
        }
    }
469778
public function getAttributes() {
    $attributes = parent::getAttributes();
    /* wir fügen den namespace hinzu wenn es nötig ist */
    if (isset($attributes['class']) && ($namespace = $this->getOption('css.namespace')) != '') {
      $attributes['class'] = array_map(array('\Psc\UI\UI','getClass'), $attributes['class']);
    }
    return $attributes;
  }
193462
function (sector, tileMatrix, row, column, imagePath) {
            this.sector = sector;
            this.tileMatrix = tileMatrix;
            this.row = row;
            this.column = column;
            this.imagePath = imagePath;

            this.texelSize = (sector.deltaLatitude() * Angle.DEGREES_TO_RADIANS) / tileMatrix.tileHeight;

            this.tileKey = tileMatrix.levelNumber.toString() + "." + row.toString() + "." + column.toString();

            this.gpuCacheKey = imagePath;
        }
137324
protected function compile()
    {
        \System::loadLanguageFile('tl_backupdb');

        switch( \Input::get('act') ) {
            case 'backup':          BackupDbRun::run( );
                                    die( );               // Beenden, da Download rausgegangen ist

            case 'webtemplate':     $objTemplate = new \BackendTemplate('be_backupdb_wstpl');
                                    $this->Template = $objTemplate;
                                    $this->Template->arrResults = BackupWsTemplate::run( );
                                    $this->Template->back = 'contao/main.php?do=BackupDB&ref' . TL_REFERER_ID;
                                    $this->Template->backupdb_version = 'BackupDB Version ' . BACKUPDB_VERSION . '.' . BACKUPDB_BUILD;
                                    return;
        }

        //--- Zielverzeichnis für Website-Templates ---
        $zielVerz = 'templates';
        if( isset( $GLOBALS['BACKUPDB']['WsTemplatePath'] ) && is_dir(TL_ROOT.'/'.trim($GLOBALS['BACKUPDB']['WsTemplatePath'], '/')) ) {
            $zielVerz = trim($GLOBALS['BACKUPDB']['WsTemplatePath'], '/');
        }
        if( isset( $GLOBALS['TL_CONFIG']['WsTemplatePath'] ) && is_dir(TL_ROOT.'/'.trim($GLOBALS['TL_CONFIG']['WsTemplatePath'], '/')) && (trim($GLOBALS['TL_CONFIG']['WsTemplatePath']) != '') ) {
            $zielVerz = trim($GLOBALS['TL_CONFIG']['WsTemplatePath'], '/');
        }

        $filename = \Environment::get('host');                                                                  // Dateiname = Domainname
        if( isset($GLOBALS['TL_CONFIG']['websiteTitle']) ) $filename = $GLOBALS['TL_CONFIG']['websiteTitle'];   // IF( Exiat WbsiteTitle ) Dateiname für Template-Dateien
        $filename = \StringUtil::generateAlias( $filename );                                                    // Dateiname = Alias für Template-Dateien

        $this->Template->ws_template_sqlfile = $zielVerz.'/' . $filename . '.sql';
        $this->Template->ws_template_txtfile = $zielVerz.'/' . $filename . '.txt';
        $this->Template->ws_template_strfile = $zielVerz.'/' . $filename . '.structure';


        $this->Template->settingslink    = $settingslink = 'contao/main.php?do=settings&amp;ref=' . TL_REFERER_ID;
        $this->Template->cronlink        = $cronlink     = 'contao/main.php?do=cron&amp;ref=' . TL_REFERER_ID;
        $this->Template->backuplink      = 'contao/main.php?do=BackupDB&amp;act=backup&amp;rt=' . REQUEST_TOKEN . '&amp;ref=' . TL_REFERER_ID;
        $this->Template->webtemplatelink = 'contao/main.php?do=BackupDB&amp;act=webtemplate&amp;rt=' . REQUEST_TOKEN . '&amp;ref=' . TL_REFERER_ID;

        $this->Template->database = $GLOBALS['TL_CONFIG']['dbDatabase'];
        $this->Template->texte    = array(
                                        'download'      => $GLOBALS['TL_LANG']['tl_backupdb']['download'],
                                        'startdownload' => $GLOBALS['TL_LANG']['tl_backupdb']['startdownload'],
                                        'database'      => $GLOBALS['TL_LANG']['tl_backupdb']['database'] . ': ',

                                        'backupdesc'    => $GLOBALS['TL_LANG']['tl_backupdb']['backupdesc'],
                                        'backupsetup'   => sprintf( $GLOBALS['TL_LANG']['tl_backupdb']['backupsetup'], $settingslink ),
                                        'backuplast'    => $GLOBALS['TL_LANG']['tl_backupdb']['backuplast'] . ': ',

                                        'croninfo'      => $GLOBALS['TL_LANG']['tl_backupdb']['croninfo'],
                                        'cronsetup'     => sprintf( $GLOBALS['TL_LANG']['tl_backupdb']['cronsetup'], $cronlink ),
                                        'cronlast'      => $GLOBALS['TL_LANG']['tl_backupdb']['cronlast'] . ': ',

                                        'maketpl'       => $GLOBALS['TL_LANG']['tl_backupdb']['maketpl'],
                                        'tpldesc'       => $GLOBALS['TL_LANG']['tl_backupdb']['tpldesc'],
                                        'tplfiles'      => $GLOBALS['TL_LANG']['tl_backupdb']['tplfiles'] . ':',
                                        'tplnobackup'   => $GLOBALS['TL_LANG']['tl_backupdb']['tplnobackup'],
                                        'tplwarning'    => $GLOBALS['TL_LANG']['tl_backupdb']['tplwarning']
                                    );

        //--- CRON Erweiterung einbeziehen, wenn vorhanden ---
        $this->Template->ws_cron = $this->checkCronExt();               // übergibt 0 (kein Cron), 1 (Cron ohne Job), 2 (Cron, Job inaktiv) oder 3 (Cron, Job aktiv)
        if( ($this->Input->get('op') == 'cron') && ($this->checkCron() == 1) ) {
            $sql = "INSERT INTO `tl_cron` "
                  ."(`id`, `tstamp`, `lastrun`, `nextrun`, `scheduled`, `title`, `job`, `t_minute`, `t_hour`, `t_dom`, `t_month`, `t_dow`, `runonce`, `enabled`, `logging`) "
                  ."VALUES ( 0, " . time() . ", 0, 0, 0, 'AutoBackupDB', 'system/modules/BackupDB/AutoBackupDB.php', '0', '2', '*', '*', '*', '', '', '1')";
            $this->Database->execute( $sql );                           // inaktiven Cronjob eintragen
            $this->reload();
        }

        //--- Letzte Backups ---
        $pfad = TL_ROOT . '/' . $GLOBALS['TL_CONFIG']['uploadPath'] . '/AutoBackupDB/';
        $this->Template->lastrun = file_exists($pfad . BACKUPDB_RUN_LAST) ? file_get_contents($pfad . BACKUPDB_RUN_LAST) : '--.--.---- --:--';
        $this->Template->lastcron = file_exists($pfad . BACKUPDB_CRON_LAST) ? file_get_contents($pfad . BACKUPDB_CRON_LAST) : '--.--.---- --:--';

        //--- Footer ---
        $this->Template->backupdb_icons = 'Icons from <a href="https://icons8.com" target="_blank">Icons8</a> (<a href="https://creativecommons.org/licenses/by-nd/3.0/" target="_blank">CC BY-ND 3.0</a>)';
        $this->Template->backupdb_version = '<a href="https://github.com/do-while/contao-BackupDB" target="_blank">BackupDB Version ' . BACKUPDB_VERSION . '.' . BACKUPDB_BUILD . '</a>';
    }
1250245
function(oRm) {
			oRm.write("<div");
			oRm.addClass("sapMListUl");
			oRm.addClass("sapMGrowingList");
			oRm.writeAttribute("id", this._oControl.getId() + "-triggerList");
			oRm.addStyle("display", "none");
			oRm.writeClasses();
			oRm.writeStyles();
			oRm.write(">");
			oRm.renderControl(this._getTrigger());
			oRm.write("</div>");
		}
727681
@Override
    public Component prepareRenderer(TableCellRenderer renderer, int row,
            int column) {
        Object value = getValueAt(row, column);
        boolean isSelected = isCellSelected(row, column);
        Component component = renderer.getTableCellRendererComponent(this, value,
                isSelected, false, row, column);

        PropertySheetTableModel.Item item = getSheetModel()
                .getPropertySheetElement(row);
        if (item.isProperty()) {
            component.setEnabled(item.getProperty().isEditable());
        }
        return component;
    }
209828
def define_layout
      super do |components|
        components << Scruffy::Components::Title.new(:title, :position => [5, 2], :size => [90, 7])
                      
        components << Scruffy::Components::Viewport.new(:one, :position => [10, 50], 
                                                        :size => VIEWPORT_SIZE, :skewY => '-25', 
                                                        &graph_block(:one))
        components << Scruffy::Components::Viewport.new(:two, :position => [30, 50], 
                                                        :size => VIEWPORT_SIZE, :skewY => '-25', 
                                                        &graph_block(:two))
        components << Scruffy::Components::Viewport.new(:three, :position => [50, 50], 
                                                        :size => VIEWPORT_SIZE, :skewY => '-25', 
                                                        &graph_block(:three))
        components << Scruffy::Components::Viewport.new(:four, :position => [70, 50], 
                                                        :size => VIEWPORT_SIZE, :skewY => '-25', 
                                                        &graph_block(:four))


        components << Scruffy::Components::Legend.new(:legend, :position => [5, 13], :size => [90, 5])
      end
    end
255637
public function cbGenJobLabel($row, $label)
    {
        $path = 'bundles/con4gisqueue';

        if($row['startworking']) {
            if ($row['endworking']) {
                // Job wurde bearbeitet
                if ($row['haserror']) {
                    // Job mit Fehler abgeschlossen
                    $icon   = "$path/exclamation.png";
                    $msg    = 'error';
                } else{
                    // Job ohne Fehler abgeschlossen
                    $icon   = "$path/tick.png";
                    $msg    = 'success';
                }
            } else {
                // Job wird gerade bearbeitet
                $icon   = "$path/control.png";
                $msg    = 'running';
            }
        } else {
            // Job wartet auf Bearbeitung
            $icon   = "$path/clock.png";
            $msg    = 'waiting';
        }

        if (isset($GLOBALS['TL_LANG']['MSC']['con4gis']['queuestatus'][$msg])) {
            $msg = $GLOBALS['TL_LANG']['MSC']['con4gis']['queuestatus'][$msg];
        }

        if (isset($row['srcmodule']) && $row['srcmodule'] != '') {
            if (isset($GLOBALS['TL_LANG']['MOD'][$row['srcmodule']][0]) &&
                $GLOBALS['TL_LANG']['MOD'][$row['srcmodule']][0] != ''
            ) {
                $srcmodule = $GLOBALS['TL_LANG']['MOD'][$row['srcmodule']][0];
            } else {
                $srcmodule = $row['srcmodule'];
            }
        } else {
            $srcmodule = '';
        }

        if (isset($row['srcid']) && $row['srcid'] != '') {
            $srcmodule .= ' - ' . $row['srcid'] . ': ';
        }

        return '<span title="' . $msg . '"><img src="' . $icon . '">' . $srcmodule . $label . '</span>';
    }
627178
function buildItem(parentAttrNode, row, context) {
    const item = {};

    if (context.primaryKey === null) resolvePrimaryKey(row, context);

    Object.keys(parentAttrNode.attributes).forEach(attrName => {
        const attrNode = parentAttrNode.attributes[attrName];

        if (context.selectedInternalLevel > 0) {
            if (!attrNode.selectedInternal) return;
            if (!attrNode.selectedInternal[context.selectedInternalLevel - 1]) return;
        } else if (!attrNode.selected) return;

        if (attrNode.attributes) {
            const subContext = Object.assign({}, context);
            subContext.attrPath = context.attrPath.concat([attrName]);

            if (attrNode.dataSources) {
                // resource context:
                subContext.resourceAttrNode = attrNode;
                subContext.primaryKey = null;
                subContext.secondaryRows = null;

                let rawResult;
                let keys;
                let keyIsNull = true;
                let parentKeyRow = row;

                if (
                    attrNode.parentDataSource &&
                    attrNode.parentDataSource !== context.resourceAttrNode.primaryDataSource
                ) {
                    parentKeyRow = context.secondaryRows[attrNode.parentDataSource];
                }

                if (parentKeyRow) {
                    rawResult = getResult(attrNode, attrNode.joinVia || attrNode.primaryDataSource, subContext);
                    keys = rawResult.parentKey.map(keyAttr => {
                        if (typeof parentKeyRow[keyAttr] === 'undefined') {
                            /*
                            // TODO: Strict mode?
                            throw new DataError(`Sub-resource "${subContext.attrPath.join('.')}" ` +
                                misses keyattribute "${keyAttr}" in parent result ` +
                                `(DataSource "${context.resourceAttrNode.primaryDataSource}")`);
                            */
                        } else if (parentKeyRow[keyAttr] !== null) {
                            keyIsNull = false;
                        }
                        return parentKeyRow[keyAttr];
                    });
                }

                if (keyIsNull) {
                    keys = [];
                } else if (!rawResult.multiValuedParentKey) {
                    // normal and composite parentKey: "keys" is a string (as array) afterwards:
                    keys = [keys.join(keySeparator)];
                } else {
                    // dereference parentKey array (key length must be 1 when multiValued)
                    // but "keys" is still an array (multiValued) afterwards:
                    keys = keys[0];

                    if (!Array.isArray(keys)) {
                        throw new DataError(
                            `Sub-resource "${subContext.attrPath.join('.')}" ` +
                                `multiValued key attribute "${rawResult.parentKey[0]}" ` +
                                'in parent result is not an array ' +
                                `(DataSource "${context.resourceAttrNode.primaryDataSource}")`
                        );
                    }
                }

                let secondaryRows = null;
                if (attrNode.joinVia) {
                    let primaryRawResult = null; // set on demand to avoid errors for empty results
                    const joinViaKeys = [];
                    secondaryRows = {};

                    keys.forEach(key => {
                        let joinViaRows = rawResult.indexedData[key];
                        if (!joinViaRows) return;

                        if (rawResult.uniqueChildKey) joinViaRows = [joinViaRows];

                        joinViaRows.forEach(joinViaRow => {
                            primaryRawResult =
                                primaryRawResult || getResult(attrNode, attrNode.primaryDataSource, subContext);

                            let childKeyIsNull = true;
                            const childKey = primaryRawResult.parentKey
                                .map(keyAttr => {
                                    if (typeof joinViaRow[keyAttr] === 'undefined') {
                                        throw new DataError(
                                            `Sub-resource "${subContext.attrPath.join('.')}" ` +
                                                `misses key attribute "${keyAttr}" in joinVia result ` +
                                                `(DataSource "${attrNode.joinVia}")`
                                        );
                                    } else if (joinViaRow[keyAttr] !== null) {
                                        childKeyIsNull = false;
                                    }
                                    return joinViaRow[keyAttr];
                                })
                                .join(keySeparator);

                            if (!childKeyIsNull) {
                                joinViaKeys.push(childKey);

                                secondaryRows[childKey] = {};
                                secondaryRows[childKey][attrNode.joinVia] = joinViaRow;
                            }
                        });
                    });

                    rawResult = primaryRawResult;
                    keys = joinViaKeys;
                }

                const subItem = [];
                keys.forEach(key => {
                    const subRow = rawResult.indexedData[key];
                    if (!subRow) {
                        // ignore
                    } else {
                        subContext.secondaryRows = secondaryRows ? secondaryRows[key] : null;

                        if (!rawResult.uniqueChildKey) {
                            subRow.forEach(singleSubRow => subItem.push(buildItem(attrNode, singleSubRow, subContext)));
                        } else {
                            subItem.push(buildItem(attrNode, subRow, subContext));
                        }
                    }
                });

                item[attrName] = attrNode.many ? subItem : subItem[0] || null;
            } else {
                // nested-attribute context:
                item[attrName] = buildItem(attrNode, row, subContext);
            }
        } else {
            item[attrName] = buildAttribute(attrNode, row, context);
        }
    });

    // Extension: "item"
    if (parentAttrNode.resourceName) {
        const resource = context.api.getResource(parentAttrNode.resourceName);
        if (resource && resource.extensions && resource.extensions.item) {
            resource.extensions.item({
                item,
                row,
                secondaryRows: context.secondaryRows,
                request: context.request,
                getAttribute: attribute => getAttribute(attribute || [], parentAttrNode),
                getResult: (attrNode, dataSourceName) =>
                    getResult(
                        attrNode || parentAttrNode,
                        dataSourceName || (attrNode || parentAttrNode).primaryDataSource,
                        context
                    ),
                buildItem: attributes => {
                    const maxRecursionLevel = 20;

                    function selectInternal(level, isSelected) {
                        attributes.forEach(attribute => {
                            let attrNode = parentAttrNode;
                            attribute.forEach(attrName => {
                                if (!(attrNode.attributes && attrNode.attributes[attrName])) {
                                    let attrStr = attribute.join('.');
                                    throw new ImplementationError(
                                        `item-extension/buildItem: Unknown attribute "${attrStr}"`
                                    );
                                }
                                attrNode = attrNode.attributes[attrName];

                                if (!attrNode.selectedInternal) {
                                    // we use a flag per recursion level to handle recursive buildItem calls independently
                                    attrNode.selectedInternal = new Array(maxRecursionLevel).fill(false);
                                }
                                attrNode.selectedInternal[level - 1] = isSelected;
                            });
                        });
                    }

                    const subContext = Object.assign({}, context);
                    subContext.selectedInternalLevel++;

                    if (subContext.selectedInternalLevel > maxRecursionLevel) {
                        let attrStr = attributes.map(attribute => attribute.join('.')).join(',');
                        throw new ImplementationError(
                            `item-extension/buildItem: Recursion depth for "${attrStr}" too big`
                        );
                    }

                    selectInternal(subContext.selectedInternalLevel, true);
                    const internalItem = buildItem(parentAttrNode, row, subContext);
                    selectInternal(subContext.selectedInternalLevel, false);

                    return internalItem;
                }
            });
        }
    }

    context.primaryKey = null; // clear primaryKey cache for next row

    return item;
}
696308
function createContentOneRowForIE(table, index, rowObj, createFlag, displayFlag) {
    var row = table.insertRow(index + 1);
    row.setAttribute("role", "row");
    if (!this.options.autoExpand && rowObj.level > 0 && displayFlag != 'block') {
        row.style.display = 'none';
    }

    if (this.options.showTree) {
        if (row.hasChild) {
            $(row).addClass('u-grid-content-parent-row');
        } else {
            $(row).addClass('u-grid-content-leaf-row');
        }

        if (row.level == 0) {
            $(row).addClass('u-grid-content-level0-row');
        } else {
            $(row).addClass('u-grid-content-levelother-row');
        }
    }

    this.createContentOneRowTdForIE(row, rowObj, createFlag);
}