예제 #1
0
파일: Layer.php 프로젝트: josemrc/ae2web
 /**
  * {@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;
 }
예제 #2
0
 /**
  * {@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;
 }
예제 #3
0
 /**
  * {@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);
 }
예제 #5
0
파일: Map.php 프로젝트: josemrc/ae2web
 /**
  * {@inheritdoc}
  */
 public function getJS()
 {
     $js = parent::getJS();
     $js['opt']['target'] = $this->getId();
     unset($js['opt']['capabilities']);
     return $js;
 }
예제 #6
0
파일: Map.php 프로젝트: akapivo/www.dmi.be
 /**
  * {@inheritdoc}
  */
 public function getJS()
 {
     $js = parent::getJS();
     unset($js['opt']['capabilities']);
     return $js;
 }
예제 #7
0
파일: Error.php 프로젝트: josemrc/ae2web
 /**
  * {@inheritdoc}
  */
 public function init()
 {
     parent::init();
     $this->loggerChannel->error($this->getMessage(), array('channel' => 'openlayers'));
     $this->messenger->addMessage($this->getMessage(), 'error', FALSE);
 }