Attach to this module all bubble-events from loaded modules
This create a Bubble-Event to answer to each event that bubles from the module's modules.
Also attach to all modules' events and handler to dispatch the event.
@param string $id source module id
2214
function (id) {
			if (!_.isString(id))
				return false;

			var module = this.getModule(id),
				events;
			this.e.log&&this.e.log("Attaching module's events...",'system');
			if (module != undefined && (events=module.getEvents()) && !_.isEmpty(events)) {
				for (e in events)
				{
					var evtConfig = {},
						eventName = 'module.'+e.split('-').pop(),
						evtCnf = events[e].getConfig(),
						event = events[e],
						eventClass;

					if (!this.hasEvent(eventName) && evtCnf.bubble && e.indexOf('event-module') == -1)
					{
						evtConfig[eventName]=_.merge({},evtCnf);
						evtConfig[eventName].listenEvent=null;
						evtConfig[eventName].handler=null;
						this.setEvents(evtConfig);
						this.getEvent(eventName);
					}

					if (this.hasEvent(eventName) && e.indexOf('event-module') == -1)
					{
						eventClass = this.getEvent(eventName);
						event.prependListener(function (e) {
							if (typeof e == 'object'
								&& e.stopPropagation == true)
										return false;
							eventClass.emit.apply(eventClass,arguments);
						});
					}

				}
				this.attachEventsHandlers();
			}
			return this;
		}
836765
public function attach($id)
    {
        // Require there to be a parent id and a valid id for the resource
        $item = $this->findOrFail($id);

        // Do the attach
        $item->fireDecoyEvent('attaching', [$item, $this->parent]);
        $item->{$this->self_to_parent}()->attach($this->parent);
        $item->fireDecoyEvent('attached', [$item, $this->parent]);

        // Return the response
        return Response::json();
    }
1315535
public function attachEvents()
    {
        $appEvents = $this->container->get('event')->getAppEvents();

        if (!empty($appEvents)) {
            foreach ($appEvents as $event => $namespace) {
                // attach all before and after event to handler
                $this->container->get('event')->attach("$event", $namespace);
            }
        }
    }
637853
public function removeBindings($id)
    {
        if ($this->hasDefinition($id)) {
            foreach ($this->getDefinition($id)->getBindings() as $key => $binding) {
                list(, $bindingId) = $binding->getValues();
                $this->removedBindingIds[(int) $bindingId] = true;
            }
        }
    }
36056
public function setModelId($id)
    {
        if (is_array($id)) {
            $this->modelId = $id;
        } else {
            $this->modelId = [$id];
        }

        // rebuild the model instance with ID
        if ($this->model) {
            $model = (is_object($this->model)) ? get_class($this->model) : $this->model;

            $this->model = new $model($id);
        }

        return $this;
    }
1264468
public function attachFiles($id, $table, $files)
    {
        foreach ($files as $file) {
            if (!empty($file)) {
                $this->attachFile($id, $table, $file);
            }
        }
    }
380881
public function populate($id)
    {
        if (empty($id)) {
            throw new EntityException('No messages id supplied', EntityException::NO_MESSAGE_ID_SUPPLIED);
        }

        $this->sendApiCall(self::ACTION_RETRIEVE, $this->getCreateUrl() . '/' . $id);
    }
891640
public function edit($id)
    {
        $this->request->allowMethod(['get', 'put']);

        $menu = $this->Menus->get($id);

        if ($this->request->is('put')) {
            $menu = $this->Menus->patchEntity($menu, $this->request->data);
            if ($this->Menus->save($menu)) {
                $this->Flash->success(__d('wasabi_core', 'The menu <strong>{0}</strong> has been saved.', $this->request->data['name']));
                $this->redirect(['action' => 'index']);
                return;
            } else {
                $this->Flash->error($this->formErrorMessage);
            }
        }
        $this->set([
            'menu' => $menu,
            'menuItems' => $this->MenuItems->find('threaded', ['order' => ['lft' => 'ASC']])->where(['MenuItems.menu_id' => $id])->hydrate(false)
        ]);
        $this->render('add');
    }
1040405
protected function registerClientEvents($name, $id)
    {
        if (!empty($this->clientEvents)) {
            $js = [];
            foreach ($this->clientEvents as $event => $handler) {
                if (isset($this->clientEventMap[$event])) {
                    $eventName = $this->clientEventMap[$event];
                } else {
                    $eventName = strtolower($name . $event);
                }
                $js[] = "jQuery('#$id').on('$eventName', $handler);";
            }
            $this->getView()->registerJs(implode("\n", $js));
        }
    }
698917
public function setId( $id )
	{
		if( $id === $this->getId() ) { return; }

		$this->_values['id'] = (string) $id ;
		$this->setModified();
	}
502156
public function setId($id = null)
    {
        if ($id !== null) {
            $id = preg_replace("/[^a-z0-9_\\\d]/i", '_', $id);

            $this->id = (string) $id;
        }
    }
937134
function reopenObject( $id )
    {
        $this->nStack++;
        $this->stack[$this->nStack] = array( 'c' => $this->currentContents,
                                             'p' => $this->currentPage );
        $this->currentContents=$id;
        // also if this object is the primary contents for a page, then set the current page to its parent
        if ( isset( $this->objects[$id]['onPage'] ) )
        {
            $this->currentPage = $this->objects[$id]['onPage'];
        }
    }
1225766
public function show($id)
    {
        $messageBoard = $this->client->get(
            sprintf('buckets/%d/message_boards/%d.json', $this->bucket, $id)
        );

        return new MessageBoard($this->response($messageBoard));
    }
338325
public function fireDestroy($id)
    {
        if (is_callable($this->getDestroy())) {
            return $this->app->call($this->getDestroy(), [$id]);
        }
    }
460937
public function attach(Registry $registry, $id = '')
    {
        if (!empty($id) || 0 === $id) {

            if (!empty($this->registries[$id])) {

                throw new RegistryException(
                    RegistryException::DUPLICATE_REGISTRATION_ATTEMPT_TEXT,
                    RegistryException::DUPLICATE_REGISTRATION_ATTEMPT_CODE
                );
            }

            $this->registries[$id] = $registry;

        } else {

            $this->registries[] = $registry;
        }
    }
1287857
public function setId($id)
    {
        if (!is_null($id)) {
            $id = (string) $id;
        }

        $this->id = $id;
        return $this;
    }
1178948
public function onEditDevice($id)
    {
        $this->onDevicesList();
        Breadcrumbs::register('device-edit', function($breadcrumbs) use($id) {
            $breadcrumbs->parent('devices-list');
            $breadcrumbs->push('Device edit #' . $id, handles('antares::logger/devices/' . $id . '/edit'));
        });
        view()->share('breadcrumbs', Breadcrumbs::render('device-edit'));
    }