/** * Update system table schema * * @param string $sql * @param string $type Schema type: `core` or <module>, default as SqlSchema::getType() * * @return bool */ protected function querySchema($sql, $type = '') { $sqlHandler = new SqlSchema(); try { $sqlHandler->queryContent($sql, $type); } catch (\Exception $exception) { $this->handler->setResult('db', array('status' => false, 'message' => 'SQL schema query failed: ' . $exception->getMessage())); return false; } return true; }
/** * {@inheritDoc} */ protected function attachDefaultListeners() { $events = $this->events; $events->attach('update.pre', array($this, 'updateSchema')); parent::attachDefaultListeners(); return $this; }
/** * {@inheritDoc} */ protected function attachDefaultListeners() { $events = $this->events; $events->attach('update.post', array($this, 'updateCarousel')); parent::attachDefaultListeners(); return $this; }
protected function attachDefaultListeners() { $events = $this->events; $events->attach('install.post', array($this, 'postUpdate')); parent::attachDefaultListeners(); return $this; }