Exemplo n.º 1
0
 /**
  * Array containing basic information about an OL Object.
  *
  * @param \Drupal\openlayers\Types\ObjectInterface $object
  * @return array
  */
 protected function getInfo(ObjectInterface $object)
 {
     $js = $object->getJS();
     $info = array('mn' => array('#type' => 'item', '#title' => 'Machine name:', '#markup' => $object->machine_name), 'fs' => array('#type' => 'item', '#title' => 'Factory service:', '#markup' => $object->factory_service));
     $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;
 }