/** * {@inheritdoc} */ public function optionsToObjects() { $import = parent::optionsToObjects(); if ($style = $this->getOption('style')) { $import = array_merge($import, Openlayers::load('style', $style)->getCollection()->getFlatList()); } if ($source = $this->getOption('source')) { $import = array_merge($import, Openlayers::load('source', $source)->getCollection()->getFlatList()); } return $import; }
/** * {@inheritdoc} */ public function optionsToObjects() { $import = parent::optionsToObjects(); foreach (array('style', 'source') as $option) { if ($option_value = $this->getOption($option, FALSE)) { if ($object = $this->getCollection()->getObjectById($option, $option_value)) { $import = array_merge($import, $object->getCollection()->getFlatList()); } else { $import = array_merge($import, Openlayers::load($option, $option_value)->getCollection()->getFlatList()); } } } return $import; }
/** * {@inheritdoc} */ public function defaultProperties() { $properties = parent::defaultProperties(); $properties['errorMessage'] = 'Error while loading @type @machine_name having service @service.'; return $properties; }
/** * Save an object in the database. * * @param ObjectInterface $object */ public static function save(Object $object) { ctools_include('export'); $configuration = $object->getConfiguration(); $export = $object->getExport(); ctools_export_crud_save($configuration['table'], $export); }
/** * {@inheritdoc} */ public function getJS() { $js = parent::getJS(); $js['opt']['target'] = $this->getId(); unset($js['opt']['capabilities']); return $js; }
/** * {@inheritdoc} */ public function getJS() { $js = parent::getJS(); unset($js['opt']['capabilities']); return $js; }
/** * {@inheritdoc} */ public function init() { parent::init(); $this->loggerChannel->error($this->getMessage(), array('channel' => 'openlayers')); $this->messenger->addMessage($this->getMessage(), 'error', FALSE); }