drupal-console icon indicating copy to clipboard operation
drupal-console copied to clipboard

debug:rest: show proper status

Open jijzult opened this issue 5 years ago • 0 comments

Issue title

debug:rest with proper status

[ debug:rest ] let status show actual enabled/disabled status

Problem/Motivation

command always showed 'disabled', even if enabled

How to reproduce

console debug:rest --uri=xxx debug:rest

Details to include: drupal-8.8.0-beta1 console 1.9.4

Solution

line 122, replace with following 2 lines: #122: $this->trans('commands.debug.rest.messages.status'), #123: (isset($config[$rest_id])) ? $this->trans('commands.debug.rest.messages.enabled') : $this->trans('commands.debug.rest.messages.disabled')]; // PATCH ECJ

line 160, insert: $enabled = array_keys( $this->getRestDrupalConfig() ); // PATCH ECJ

line 176, replace: replace $status, with: in_array(str_replace(':','.',$id), $enabled) ? $this->trans('commands.debug.rest.messages.enabled') : $this->trans('commands.debug.rest.messages.disabled'), // PATCH ECJ

cheers.

jijzult avatar Nov 15 '19 12:11 jijzult