diff --git a/core/modules/responsive_preview/lib/Drupal/responsive_preview/DeviceFormController.php b/core/modules/responsive_preview/lib/Drupal/responsive_preview/DeviceFormController.php index a33df45..183596f 100644 --- a/core/modules/responsive_preview/lib/Drupal/responsive_preview/DeviceFormController.php +++ b/core/modules/responsive_preview/lib/Drupal/responsive_preview/DeviceFormController.php @@ -114,11 +114,4 @@ public function save(array $form, array &$form_state) { $form_state['redirect'] = 'admin/config/content/responsive-preview'; } - /** - * {@inheritdoc} - */ - public function delete(array $form, array &$form_state) { - $form_state['redirect'] = 'admin/config/content/responsive-preview/manage/' . $this->entity->id() . '/delete'; - } - } diff --git a/core/modules/responsive_preview/responsive_preview.module b/core/modules/responsive_preview/responsive_preview.module index 03e26e3..fdc7465 100644 --- a/core/modules/responsive_preview/responsive_preview.module +++ b/core/modules/responsive_preview/responsive_preview.module @@ -77,6 +77,20 @@ function responsive_preview_get_devices_list() { } /** + * Fetches a responsive preview device by ID. + * + * @param string $id + * A string representing the device ID (machine name). + * + * @return + * A fully-loaded device object if a device with the given ID exists, + * or FALSE otherwise. + */ +function responsive_preview_device_load($id) { + return entity_load('responsive_preview_device', $id); +} + +/** * Prevents the preview tab from rendering on administration pages. */ function responsive_preview_access() {