set up global elements.
541332
def fromSchemaItem(self, item):
        
        if item.isElement() is False or item.isLocal() is True:
            raise TypeError, 'expecting global element declaration: %s' %item.getItemTrace()

        local = False
        qName = item.getAttribute('type')
        if not qName:
            etp = item.content
            local = True
        else:
            etp = item.getTypeDefinition('type')
            
        if etp is None:
            if local is True: 
                self.content = ElementLocalComplexTypeContainer(do_extended=self.do_extended)
            else: 
                self.content = ElementSimpleTypeContainer()
        elif etp.isLocal() is False:
            self.content = ElementGlobalDefContainer()
        elif etp.isSimple() is True: 
            self.content = ElementLocalSimpleTypeContainer()
        elif etp.isComplex():
            self.content = ElementLocalComplexTypeContainer(do_extended=self.do_extended)
        else:
            raise Wsdl2PythonError, "Unknown element declaration: %s" %item.getItemTrace()

        self.logger.debug('ElementWriter setUp container "%r", Schema Item "%s"' %(
            self.content, item.getItemTrace()))
        
        self.content.setUp(item)
1286578
def setup_ui(self, ):
        
        grid = QtGui.QGridLayout(self)
        grid.setContentsMargins(0, 0, 0, 0)
        self.setLayout(grid)
50491
protected function setupSections()
	{
		if(version_compare(VERSION, '3.3', '<')) {
			if(!isset($GLOBALS['TL_CONFIG']['customSections']) || $GLOBALS['TL_CONFIG']['customSections'] == '') {
				$GLOBALS['TL_CONFIG']['customSections'] = 'bootstrap';
			}
			elseif(strpos($GLOBALS['TL_CONFIG']['customSections'], 'bootstrap') === false) {
				$GLOBALS['TL_CONFIG']['customSections'] .= ',bootstrap';
			}

			$config = \Config::getInstance();
			$config->add('$GLOBALS[\'TL_CONFIG\'][\'customSections\']', $GLOBALS['TL_CONFIG']['customSections']);
			$config->save();

		}
	}
218750
public function init()
    {
        $pages = $this->getModel()->getPages();

        // Check datas
        if (empty($pages)) {
            return;
        }

        global $admin_page_hooks;

        // Set the internal pointer of an array to its first element
        reset($pages);

        // Update identifier
        $identifier = Helpers::urlize(key($pages));
        $this->getModel()->setIdentifier($identifier);

        // Add root single menu if identifier is unknown
        if (!isset($admin_page_hooks[$identifier])) {
            $this->addRootPage();
        }

        // Iterate on pages
        foreach ($pages as $slug => $options) {
            if (empty($options)) {
                continue;
            }

            // Get slug
            $slug = Helpers::urlize($slug);

            // Add child menu
            $this->addChild($slug, $options);
        }
    }
246080
public function setup() {

		if ( isset( $this->struct['description'] ) ) {
			$this->set_data( $this->struct['description'] );
		}

		$this->set_attributes();
		$this->set_dismissable();
		$this->set_state();

	}
1198218
protected function init()
	{
		$this->environment = $this->getConfig('app.settings.environment');

		// locale and timezone set
		\Locale::setDefault($this->getConfig('app.settings.locale'));
		date_default_timezone_set($this->getConfig('app.settings.timezone'));


		// load objects
		$this->eventDispatcher = $this->container->get('Emitter');
	}
251338
function _addGlobalToolsToElement(enabledElement) {
  if (!store.modules.globalConfiguration.state.globalToolSyncEnabled) {
    return;
  }

  Object.keys(store.state.globalTools).forEach(function(key) {
    const { tool, configuration } = store.state.globalTools[key];

    addToolForElement(enabledElement, tool, configuration);
  });
}
321372
def _set_global_defaults(xmlglobals):
    """"""
    for key, val in xmlglobals.items():
        if key != "defaults":
            for name, tag in val.items():
                _update_from_globals(tag, xmlglobals, None)
828218
def setup(app):
    """"""
    app.add_config_value(
        'site_url',
        default=None,
        rebuild=False
    )
    try:
        app.add_config_value(
            'html_baseurl',
            default=None,
            rebuild=False
        )
    except:
        pass

    app.connect('html-page-context', add_html_link)
    app.connect('build-finished', create_sitemap)
    app.sitemap_links = []
    app.locales = []
627423
function () {
            config = scope.getConfig();

            // Setup container
            $el = config.$el;

            $(document).on('mouseup', handleMouseUp);

            validateConfig();
            prepareDOM();
            createPages();

            lazyLoader = scope.createComponent('lazy-loader');
            lazyLoader.init(config.pages);
        }
348066
function setGlobalEval( elems, refElements ) {
	var elem,
		i = 0;
	for ( ; (elem = elems[i]) != null; i++ ) {
		jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) );
	}
}
983089
private void initEngine() {
    engine = (NashornScriptEngine) new ScriptEngineManager().getEngineByName("nashorn");

    try {
      engine.eval("(function(global){global.global = global})(this);");
      engine.eval(NashornVueTemplateCompiler.NASHORN_VUE_TEMPLATE_COMPILER);
    } catch (ScriptException e) {
      e.printStackTrace();
    }
  }
699608
public function setup() {

		$this->struct['modal'] = $this->get_base();
		$this->config();
		$this->struct['modal']['config']['view'] = $this->struct['modal']['config']['template'];
		unset( $this->struct['modal']['config']['template'] );
		add_action( 'uix_control_item_submit_' . $this->slug, $this->struct['modal']['config']['callback'], 100 );
		parent::setup();
		$this->set_submit();
	}
434109
def set_optional_elements(self):
        """"""
        self.set_categories()
        self.set_copyright()
        self.set_generator()
        self.set_image()
        self.set_language()
        self.set_last_build_date()
        self.set_managing_editor()
        self.set_published_date()
        self.set_pubsubhubbub()
        self.set_ttl()
        self.set_web_master()
1209476
def setup(self):
        """"""

        self.allow = self.config['allow']
        self.halt = self.config['halt']
        self.skip = self.config['skip']
87471
def _setup(self):
        ""
        self.example.error = None
        self.example.traceback = ''
        # inject function contexts from parent functions
        c = Context(parent=self.context)
        #for parent in reversed(self.example.parents):
        #    c._update_properties(locals_from_function(parent))
        self.context = c
        if self.is_root_runner:
            run.before_all.execute(self.context)
        self.example.before(self.context)
1220090
private void setupComponents() {
		cancelButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				dispose();
			}
		});

		finishButton.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent e) {
				JOptionPane.showMessageDialog(getContentPane(), "Wizard finished!");
				dispose();
			}
		});

		cancelButton.setMnemonic(KeyEvent.VK_C);
		previousButton.setMnemonic(KeyEvent.VK_P);
		nextButton.setMnemonic(KeyEvent.VK_N);
		finishButton.setMnemonic(KeyEvent.VK_F);

		wizardPageContainer.addContainerListener(new MinimumSizeAdjuster());
	}