protected function getSystemData() { if (!$this->systemManager) { return []; } $requirements = $this->systemManager->listRequirements(); $systemData = []; foreach ($requirements as $key => $requirement) { if ($requirement['title'] instanceof \Drupal\Core\StringTranslation\TranslatableMarkup) { $title = $requirement['title']->render(); } else { $title = $requirement['title']; } $systemData['system'][$title] = $requirement['value']; } if ($this->settings) { try { $hashSalt = $this->settings->getHashSalt(); } catch (\Exception $e) { $hashSalt = ''; } $systemData['system'][$this->trans('commands.site.status.messages.hash_salt')] = $hashSalt; $systemData['system'][$this->trans('commands.site.status.messages.console')] = $this->getApplication()->getVersion(); } return $systemData; }
/** * Displays the site status report. * * @return array * A render array containing a list of system requirements for the Drupal * installation and whether this installation meets the requirements. */ public function status() { $requirements = $this->systemManager->listRequirements(); return array('#theme' => 'status_report', '#requirements' => $requirements); }