/** * {@inheritdoc} */ public function delete($conditions) { if (!$conditions) { return; } $path = $this->load($conditions); $query = $this->db->delete('url_alias'); foreach ($conditions as $field => $value) { if ($field == 'source' || $field == 'alias') { // Use LIKE for case-insensitive matching (still stupid). $query->condition($field, $this->db->escapeLike($value), 'LIKE'); } else { if ('langcode' === $field) { // Drupal 7 compat $field = 'language'; } $query->condition($field, $value); } } $deleted = $query->execute(); // @todo Switch to using an event for this instead of a hook. $this->moduleHandler->invokeAll('path_delete', [$path]); \Drupal::service('path.alias_manager')->cacheClear(); return $deleted; }
/** * {@inheritdoc} */ public function delete($name) { $existing = null; if ($this->dispatcher) { try { $existing = $this->load($name); } catch (\InvalidArgumentException $e) { } } $this->db->delete('umenu')->condition('name', $name)->execute(); if ($this->dispatcher && $existing) { $this->dispatcher->dispatch('menu:delete', new GenericEvent($existing)); } }
public function delete($table, array $options = array()) { return $this->connection->delete($table, $options); }
/** * @see DatabaseConnection::delete */ public function delete($where = '', $whereArgs = null, $limit = null) { return $this->dbc->delete($this->tblname, $where, $whereArgs, $limit); }