Initilizes this replicable container

Goes through the internal widgets, clones them, and adds them to the
widget tree.
357411
public function init()
    {
        // TODO: remove this when deprecated $replicators property is removed
        if ($this->replication_ids === null && $this->replicators !== null) {
            $this->replication_ids = array_keys($this->replicators);
        }

        if ($this->replication_ids === null) {
            $this->replication_ids = array(0);
        }

        // Remove children, these are now the prototype widgets
        foreach ($this->children as $child_widget) {
            $this->prototype_widgets[] = $this->remove($child_widget);
        }

        foreach ($this->replication_ids as $id) {
            $this->addReplication($id);
        }

        parent::init();
    }
1017145
public function init()
    {
        parent::init();

        $this->createEmbeddedWidgets();
        $this->enter_another_link->title = $this->enter_text;
        $this->enter_another_link->link = sprintf(
            "javascript:%s_obj.addRow();",
            $this->getId()
        );

        $this->enter_another_link->init();

        // init input cells
        foreach ($this->input_cells as $cell) {
            $cell->init();
        }

        /*
         * Initialize replicators
         *
         * Don't use getHiddenField() here because the serialized field is not
         * updated by the controlling JavaScript and will not contain added
         * replicator ids.
         */
        $data = $this->getForm()->getFormData();
        $replicator_field = isset($data[$this->getId() . '_replicators'])
            ? $data[$this->getId() . '_replicators']
            : null;

        if ($replicator_field === null || $replicator_field == '') {
            // use generated ids
            for ($i = 0; $i < $this->number; $i++) {
                $this->replicators[] = $i;
            }
        } else {
            // retrieve ids from form
            $this->replicators = explode(',', $replicator_field);
        }
    }
1125914
private void initialize() {
//		if (selection != null && selection.isEmpty() == false
//				&& selection instanceof IStructuredSelection) {
//			IStructuredSelection ssel = (IStructuredSelection) selection;
//			if (ssel.size() > 1)
//				return;
//			Object obj = ssel.getFirstElement();
//			if (obj instanceof IResource) {
//				IContainer container;
//				if (obj instanceof IContainer)
//					container = (IContainer) obj;
//				else
//					container = ((IResource) obj).getParent();
//				containerText.setText(container.getFullPath().toString());
//			}
//		}
		System.err.println("### Set default selected MuleVersion to index: " + muleVersionCombo.getItemCount());
		muleVersionCombo.select(muleVersionCombo.getItemCount() - 1);
	}
1090246
protected void postInit() {
        Collection<TrainingListener> oldListeners = new ArrayList<>();
        Collection<TrainingListener> replicatedListeners = new ArrayList<>();

        if (parallelWrapper.getListeners() != null) {
            oldListeners.addAll(parallelWrapper.getListeners());
        }
        configureListeners(uuid, oldListeners, replicatedListeners);

        this.replicatedModel.setListeners(replicatedListeners);
    }
76988
def initialize(self):
        
        super(Block, self).initialize()

        block = self.block

        if block: #: This block is setting the content of another block
            #: Remove the existing blocks children
            if self.mode == 'replace':
                #: Clear the blocks children
                for c in block.children:
                    c.destroy()
            #: Add this blocks children to the other block
            block.insert_children(None, self.children)

        else: #: This block is inserting it's children into it's parent
            self.parent.insert_children(self, self.children)
1297681
def init_widget(self):
        
        super(AndroidAutoCompleteTextView, self).init_widget()
        self.widget.setAdapter(self.adapter)
1205907
def _add_widget(self, widget):
        
        widgets = self.widgets()
        widgets += [widget]
        self._save_customization(widgets)
163735
def init_layout(self):
        
        super(AndroidToast, self).init_layout()
        if not self.made_toast:
            for view in self.child_widgets():
                self.toast.setView(view)
                break
297872
def init_widget(self):
        
        super(AndroidSwipeRefreshLayout, self).init_widget()
        d = self.declaration
        w = self.widget
        if not d.enabled:
            self.set_enabled(d.enabled)
        if d.indicator_background_color:
            self.set_indicator_background_color(d.indicator_background_color)
        if d.indicator_color:
            self.set_indicator_color(d.indicator_color)
        if d.trigger_distance:
            self.set_trigger_distance(d.trigger_distance)
        w.onRefresh.connect(self.on_refresh)
        w.setOnRefreshListener(w.getId())
870277
private void initHandlers() {
		mapWidget.getMapModel().getMapView().addMapViewChangedHandler(this);

		mapWidget.getMapModel().runWhenInitialized(new Runnable() {

			public void run() {
				zoomTo();
			}
		});
	}
841808
protected <W extends Widget> W widget(WidgetFactory<W> factory,
      WidgetInitializer<W> initializers) {
    return widget(get(0), factory, initializers);
  }
1247482
public function init()
    {
        $children = array();
        foreach ($this->children as $child_widget) {
            $children[] = $this->remove($child_widget);
        }

        $disclosure = new SwatDisclosure();
        $disclosure->id = $disclosure->getUniqueId();
        $prototype_id = $disclosure->id;

        foreach ($children as $child_widget) {
            $disclosure->add($child_widget);
        }

        $this->add($disclosure);

        parent::init();

        foreach ($this->replicators as $id => $title) {
            $disclosure = $this->getWidget($prototype_id, $id);
            $disclosure->title = $title;
        }
    }
798874
def init_widget(self):
        
        super(AndroidPagerFragment, self).init_widget()
        d = self.declaration
        if d.title:
            self.set_title(d.title)
        if d.icon:
            self.set_icon(d.icon)
260902
def init_widget(self):
        
        super(AndroidDrawerLayout, self).init_widget()
        d = self.declaration
        if d.title:
            self.set_title(d.title)
        if d.drawer_elevation:
            self.set_drawer_elevation(d.drawer_elevation)
        if d.lock_mode:
            self.set_lock_mode(d.lock_mode)
        if d.scrim_color:
            self.set_scrim_color(d.scrim_color)
        if d.status_bar_background_color:
            self.set_status_bar_background_color(d.status_bar_background_color)
454152
private function createEmbeddedWidgets()
    {
        if (!$this->widgets_created) {
            $this->check_all = new SwatCheckAll();
            $this->check_all->parent = $this;

            $this->widgets_created = true;
        }
    }
510197
def init_widget(self):
        
        super(AndroidFragment, self).init_widget()
        f = self.fragment
        f.setFragmentListener(f.getId())
        f.onCreateView.connect(self.on_create_view)
        f.onDestroyView.connect(self.on_destroy_view)
1091569
public function init()
    {
        parent::init();
        if (!$this->template->hasTag($this->item_tag)) {
            if (@$this->app->compat_42 && $this instanceof Menu_Basic) {
                // look for MenuItem

                $default = $this->item_tag;

                $this->item_tag = 'MenuItem';
                $this->container_tag = 'Item';
                if (!$this->template->hasTag($this->item_tag)) {
                    throw $this->template->exception('Template must have "'.$default.'" tag')
                        ->addMoreInfo('compat', 'Also tried for compatibility reason "'.$this->item_tag.'" tag');
                }
            } else {
                throw $this->template->exception('Template must have "'.$this->item_tag.'" tag');
            }
        }

        $this->row_t = $this->template->cloneRegion($this->item_tag);

        if ($this->template->hasTag('sep')) {
            $this->sep_html = $this->template->get('sep');
        }
    }