comparison core/modules/path/path.api.php @ 18:af1871eacc83

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:33:08 +0100
parents 1fec387a4317
children
comparison
equal deleted inserted replaced
17:129ea1e6d783 18:af1871eacc83
18 * \Drupal\Core\Path\AliasStorageInterface::save(). 18 * \Drupal\Core\Path\AliasStorageInterface::save().
19 * 19 *
20 * @see \Drupal\Core\Path\AliasStorageInterface::save() 20 * @see \Drupal\Core\Path\AliasStorageInterface::save()
21 */ 21 */
22 function hook_path_insert($path) { 22 function hook_path_insert($path) {
23 db_insert('mytable') 23 \Drupal::database()->insert('mytable')
24 ->fields([ 24 ->fields([
25 'alias' => $path['alias'], 25 'alias' => $path['alias'],
26 'pid' => $path['pid'], 26 'pid' => $path['pid'],
27 ]) 27 ])
28 ->execute(); 28 ->execute();
37 * 37 *
38 * @see \Drupal\Core\Path\AliasStorageInterface::save() 38 * @see \Drupal\Core\Path\AliasStorageInterface::save()
39 */ 39 */
40 function hook_path_update($path) { 40 function hook_path_update($path) {
41 if ($path['alias'] != $path['original']['alias']) { 41 if ($path['alias'] != $path['original']['alias']) {
42 db_update('mytable') 42 \Drupal::database()->update('mytable')
43 ->fields(['alias' => $path['alias']]) 43 ->fields(['alias' => $path['alias']])
44 ->condition('pid', $path['pid']) 44 ->condition('pid', $path['pid'])
45 ->execute(); 45 ->execute();
46 } 46 }
47 } 47 }
54 * \Drupal\Core\Path\AliasStorageInterface::save(). 54 * \Drupal\Core\Path\AliasStorageInterface::save().
55 * 55 *
56 * @see \Drupal\Core\Path\AliasStorageInterface::delete() 56 * @see \Drupal\Core\Path\AliasStorageInterface::delete()
57 */ 57 */
58 function hook_path_delete($path) { 58 function hook_path_delete($path) {
59 db_delete('mytable') 59 \Drupal::database()->delete('mytable')
60 ->condition('pid', $path['pid']) 60 ->condition('pid', $path['pid'])
61 ->execute(); 61 ->execute();
62 } 62 }
63 63
64 /** 64 /**