You are here

protected function Debug::getInfo in Openlayers 7.3

Array containing basic information about an OL Object.

Parameters

\Drupal\openlayers\Types\ObjectInterface $object:

Return value

array

1 call to Debug::getInfo()
Debug::postBuild in src/Plugin/Component/Debug/Debug.php
Invoked after an objects render array is built.

File

src/Plugin/Component/Debug/Debug.php, line 120
Component: Debug.

Class

Debug
Class Debug.

Namespace

Drupal\openlayers\Plugin\Component\Debug

Code

protected function getInfo(ObjectInterface $object) {
  $js = $object
    ->getJS();
  $info = array(
    'mn' => array(
      '#type' => 'item',
      '#title' => 'Machine name:',
      '#markup' => $object
        ->getMachineName(),
    ),
    'fs' => array(
      '#type' => 'item',
      '#title' => 'Factory service:',
      '#markup' => $object
        ->getFactoryService(),
    ),
  );
  $plugin_description = $object
    ->getPluginDescription();
  if (!empty($plugin_description)) {
    $info['pd'] = array(
      '#type' => 'item',
      '#title' => 'Plugin description:',
      '#markup' => $plugin_description,
    );
  }
  if (isset($js['opt'])) {
    $info['opt'] = array(
      '#type' => 'item',
      '#title' => 'Options:',
      'options' => array(
        '#markup' => $this
          ->toInfoArrayMarkup($js['opt']),
      ),
    );
  }
  return $info;
}