/** * Returns an array containing the parameter info. * @see ParserHook::getParameterInfo * * TODO: migrate stuff * * @since 0.7 * * @return array */ protected function getParameterInfo($type) { global $egMapsDefaultTitle, $egMapsDefaultLabel; $params = MapsMapper::getCommonParameters(); $params['mappingservice']['feature'] = 'display_map'; $params['zoom']['dependencies'] = array('coordinates', 'mappingservice'); $params['zoom']['manipulations'] = new MapsParamZoom(); $params['coordinates'] = array('aliases' => array('coords', 'location', 'address', 'addresses', 'locations', 'points'), 'criteria' => new CriterionIsLocation($type === ParserHook::TYPE_FUNCTION ? '~' : '|'), 'manipulations' => new MapsParamLocation($type === ParserHook::TYPE_FUNCTION ? '~' : '|'), 'dependencies' => array('mappingservice', 'geoservice'), 'default' => array(), 'islist' => true, 'delimiter' => $type === ParserHook::TYPE_FUNCTION ? ';' : "\n"); $params['title'] = array('name' => 'title', 'default' => $egMapsDefaultTitle); $params['label'] = array('default' => $egMapsDefaultLabel, 'aliases' => 'text'); $params['icon'] = array('default' => ''); $params['visitedicon'] = array('default' => ''); $params['lines'] = array('default' => array(), 'criteria' => new CriterionLine('~'), 'manipulations' => new MapsParamLine('~'), 'delimiter' => ';', 'islist' => true); $params['polygons'] = array('default' => array(), 'criteria' => new CriterionPolygon('~'), 'manipulations' => new MapsParamPolygon('~'), 'delimiter' => ';', 'islist' => true); $params['circles'] = array('default' => array(), 'manipulations' => new MapsParamCircle('~'), 'delimiter' => ';', 'islist' => true); $params['rectangles'] = array('default' => array(), 'manipulations' => new MapsParamRectangle('~'), 'delimiter' => ';', 'islist' => true); $params['copycoords'] = array('type' => 'boolean', 'default' => false); $params['static'] = array('type' => 'boolean', 'default' => false); $params['wmsoverlay'] = array('type' => 'string', 'default' => false, 'manipulations' => new MapsParamWmsOverlay(' '), 'delimiter' => ';'); $params['maxzoom'] = array('type' => 'integer', 'default' => false, 'manipulatedefault' => false, 'dependencies' => 'minzoom'); $params['minzoom'] = array('type' => 'integer', 'default' => false, 'manipulatedefault' => false, 'lowerbound' => 0); foreach ($params as $name => &$param) { if (!array_key_exists('message', $param)) { $param['message'] = 'maps-displaymap-par-' . $name; } } return $params; }
/** * Returns an array containing the parameter info. * @see ParserHook::getParameterInfo * * @since 0.7 * * @return array */ protected function getParameterInfo($type) { global $egMapsDefaultServices, $egMapsDefaultTitle, $egMapsDefaultLabel; $params = MapsMapper::getCommonParameters(); $params['mappingservice']->setDefault($egMapsDefaultServices['display_point']); $params['mappingservice']->addManipulations(new MapsParamService('display_point')); $params['mappingservice']->setMessage('maps-displaypoints-par-mappingservice'); $params['zoom']->addDependencies('coordinates', 'mappingservice'); $params['zoom']->addManipulations(new MapsParamZoom()); $params['zoom']->setMessage('maps-displaypoints-par-zoom'); $params['coordinates'] = new ListParameter('coordinates', $type === ParserHook::TYPE_FUNCTION ? ';' : "\n"); $params['coordinates']->addAliases('coords', 'location', 'address', 'addresses', 'locations'); $params['coordinates']->addCriteria(new CriterionIsLocation($type === ParserHook::TYPE_FUNCTION ? '~' : '|')); $params['coordinates']->addManipulations(new MapsParamLocation($type === ParserHook::TYPE_FUNCTION ? '~' : '|')); $params['coordinates']->addDependencies('mappingservice', 'geoservice'); $params['coordinates']->setMessage('maps-displaypoints-par-coordinates'); $params['centre'] = new Parameter('centre'); $params['centre']->setDefault(false); $params['centre']->addAliases('center'); $params['centre']->addCriteria(new CriterionIsLocation()); $params['centre']->setMessage('maps-displaypoints-par-centre'); $params['centre']->setDoManipulationOfDefault(false); $manipulation = new MapsParamLocation(); $manipulation->toJSONObj = true; $params['centre']->addManipulations($manipulation); $params['title'] = new Parameter('title', Parameter::TYPE_STRING, $egMapsDefaultTitle); $params['title']->setMessage('maps-displaypoints-par-title'); $params['label'] = new Parameter('label', Parameter::TYPE_STRING, $egMapsDefaultLabel, array('text')); $params['label']->setMessage('maps-displaypoints-par-label'); $params['icon'] = new Parameter('icon', Parameter::TYPE_STRING, '', array(), array(new CriterionNotEmpty())); $params['icon']->setMessage('maps-displaypoints-par-icon'); return $params; }
/** * Returns an array containing the parameter info. * * @since 1.0 * * @return array */ protected function getParameterInfo() { global $egMapsDefaultLabel, $egMapsDefaultTitle; global $smgQPForceShow, $smgQPShowTitle, $smgQPTemplate, $smgQPHideNamespace; $params = ParamDefinition::getCleanDefinitions(MapsMapper::getCommonParameters()); $this->service->addParameterInfo($params); $params['zoom']->setDefault(false); $params['zoom']->setDoManipulationOfDefault(false); $params['staticlocations'] = new ListParameter('staticlocations', ';'); $params['staticlocations']->addAliases('locations', 'points'); $params['staticlocations']->addCriteria(new CriterionIsLocation('~')); $params['staticlocations']->addManipulations(new MapsParamLocation('~')); $params['staticlocations']->setDefault(array()); $params['staticlocations']->setMessage('semanticmaps-par-staticlocations'); $params['icon'] = new Parameter('icon', Parameter::TYPE_STRING, '', array(), array(new CriterionNotEmpty())); $params['icon']->setMessage('maps-displaypoints-par-icon'); $params['visitedicon'] = new Parameter('visitedicon', Parameter::TYPE_STRING, '', array(), array(new CriterionNotEmpty())); $params['visitedicon']->setMessage('maps-displaymap-par-visitedicon'); $params['forceshow'] = new Parameter('forceshow', Parameter::TYPE_BOOLEAN, $smgQPForceShow, array('force show')); $params['forceshow']->setMessage('semanticmaps-par-forceshow'); $params['showtitle'] = new Parameter('showtitle', Parameter::TYPE_BOOLEAN, $smgQPShowTitle, array('show title')); $params['showtitle']->setMessage('semanticmaps-par-showtitle'); $params['hidenamespace'] = new Parameter('hidenamespace', Parameter::TYPE_BOOLEAN, $smgQPHideNamespace, array('hide namespace')); $params['hidenamespace']->setMessage('semanticmaps-par-hidenamespace'); $params['template'] = new Parameter('template', Parameter::TYPE_STRING, $smgQPTemplate, array(), array(new CriterionNotEmpty())); $params['template']->setDoManipulationOfDefault(false); $params['template']->setMessage('semanticmaps-par-template'); $params['title'] = new Parameter('title', Parameter::TYPE_STRING, $egMapsDefaultTitle); $params['title']->setMessage('maps-displaypoints-par-title'); $params['label'] = new Parameter('label', Parameter::TYPE_STRING, $egMapsDefaultLabel, array('text')); $params['label']->setMessage('maps-displaypoints-par-label'); return $params; }
/** * Returns an array containing the parameter info. * * @since 1.0 * * @return array */ protected function getParameterInfo() { $params = ParamDefinition::getCleanDefinitions(MapsMapper::getCommonParameters()); $this->service->addParameterInfo($params); $params['zoom']['default'] = false; $params['zoom']['manipulatedefault'] = false; return array_merge($params, $this->getParameterDefinitions()); }
/** * Returns an array containing the parameter info. * @see ParserHook::getParameterInfo * * @since 0.7 * * @return array */ protected function getParameterInfo($type) { $params = MapsMapper::getCommonParameters(); $params['mappingservice']['feature'] = 'display_map'; $params['coordinates'] = array('type' => 'mapslocation', 'aliases' => array('coords', 'location', 'address', 'addresses', 'locations', 'points'), 'dependencies' => array('mappingservice', 'geoservice'), 'default' => array(), 'islist' => true, 'delimiter' => $type === ParserHook::TYPE_FUNCTION ? ';' : "\n", 'message' => 'maps-displaymap-par-coordinates'); $params = array_merge($params, self::getCommonMapParams()); return $params; }
/** * Returns an array containing the parameter info. * @see ParserHook::getParameterInfo * * @since 0.7 * * @return array */ protected function getParameterInfo($type) { global $egMapsMapWidth, $egMapsMapHeight, $egMapsDefaultServices; $params = MapsMapper::getCommonParameters(); $params['mappingservice']->setDefault($egMapsDefaultServices['display_map']); $params['mappingservice']->addManipulations(new MapsParamService('display_map')); $params['mappingservice']->setMessage('maps-displaymap-par-mappingservice'); $params['coordinates'] = new Parameter('coordinates'); $params['coordinates']->addAliases('coords', 'location', 'address'); $params['coordinates']->addCriteria(new CriterionIsLocation()); $params['coordinates']->addDependencies('mappingservice', 'geoservice'); $params['coordinates']->setMessage('maps-displaymap-par-coordinates'); $params['coordinates']->setDoManipulationOfDefault(false); $manipulation = new MapsParamLocation(); $manipulation->toJSONObj = true; $params['coordinates']->addManipulations($manipulation); return $params; }
/** * Returns an array containing the parameter info. * * @since 1.0 * * @return array */ protected function getParameterInfo() { global $smgFIMulti, $smgFIFieldSize; $params = ParamDefinition::getCleanDefinitions(MapsMapper::getCommonParameters()); $this->service->addParameterInfo($params); $params['zoom']->setDefault(false, false); $params['multi'] = new Parameter('multi', Parameter::TYPE_BOOLEAN); $params['multi']->setDefault($smgFIMulti, false); $params['fieldsize'] = new Parameter('fieldsize', Parameter::TYPE_INTEGER); $params['fieldsize']->setDefault($smgFIFieldSize, false); $params['fieldsize']->addCriteria(new CriterionInRange(5, 100)); $params['icon'] = new Parameter('icon'); $params['icon']->setDefault(''); $params['icon']->addCriteria(new CriterionNotEmpty()); $manipulation = new MapsParamLocation(); $manipulation->toJSONObj = true; $params['locations'] = array('aliases' => array('points'), 'criteria' => new CriterionIsLocation(), 'manipulations' => $manipulation, 'default' => array(), 'islist' => true, 'delimiter' => self::SEPARATOR, 'message' => 'semanticmaps-par-locations'); $params['geocodecontrol'] = new Parameter('geocodecontrol', Parameter::TYPE_BOOLEAN); $params['geocodecontrol']->setDefault(true, false); $params['geocodecontrol']->setMessage('semanticmaps-par-geocodecontrol'); return $params; }
/** * Returns an array containing the parameter info. * * @since 1.0 * * @return array */ protected function getParameterInfo() { global $smgQPShowTitle, $smgQPTemplate, $smgQPHideNamespace; $params = ParamDefinition::getCleanDefinitions(MapsMapper::getCommonParameters()); $this->service->addParameterInfo($params); $params['staticlocations'] = array('type' => 'mapslocation', 'aliases' => array('locations', 'points'), 'default' => array(), 'islist' => true, 'delimiter' => ';', 'message' => 'semanticmaps-par-staticlocations'); $params['showtitle'] = array('type' => 'boolean', 'aliases' => 'show title', 'default' => $smgQPShowTitle); $params['hidenamespace'] = array('type' => 'boolean', 'aliases' => 'hide namespace', 'default' => $smgQPHideNamespace); $params['template'] = array('default' => $smgQPTemplate); $params['activeicon'] = array('type' => 'string', 'default' => ''); $params['pagelabel'] = array('type' => 'boolean', 'default' => false); // Messages: // semanticmaps-par-staticlocations, semanticmaps-par-forceshow, semanticmaps-par-showtitle, // semanticmaps-par-hidenamespace, semanticmaps-par-centre, semanticmaps-par-template, // semanticmaps-par-geocodecontrol, semanticmaps-par-activeicon semanticmaps-par-markerlabel foreach ($params as $name => &$data) { if (is_array($data) && !array_key_exists('message', $data)) { $data['message'] = 'semanticmaps-par-' . $name; } } $params = array_merge($params, MapsDisplayMap::getCommonMapParams()); return $params; }
/** * Returns an array containing the parameter info. * * @since 1.0 * * @return array */ protected function getParameterInfo() { global $egMapsDefaultLabel, $egMapsDefaultTitle; global $smgQPForceShow, $smgQPShowTitle, $smgQPTemplate; $params = MapsMapper::getCommonParameters(); $this->service->addParameterInfo( $params ); $params['zoom']->setDefault( false ); $params['zoom']->setDoManipulationOfDefault( false ); $params['staticlocations'] = new ListParameter( 'staticlocations', ';' ); $params['staticlocations']->addAliases( 'locations' ); $params['staticlocations']->addCriteria( new CriterionIsLocation( '~' ) ); $params['staticlocations']->addManipulations( new MapsParamLocation( '~' ) ); $params['staticlocations']->setDefault( array() ); $params['staticlocations']->setMessage( 'semanticmaps-par-staticlocations' ); $params['centre'] = new Parameter( 'centre' ); $params['centre']->setDefault( false ); $params['centre']->addAliases( 'center' ); $params['centre']->addCriteria( new CriterionIsLocation() ); $params['centre']->setDoManipulationOfDefault( false ); $manipulation = new MapsParamLocation(); $manipulation->toJSONObj = true; $params['centre']->addManipulations( $manipulation ); $params['centre']->setMessage( 'semanticmaps-par-centre' ); $params['icon'] = new Parameter( 'icon', Parameter::TYPE_STRING, '', array(), array( New CriterionNotEmpty() ) ); $params['icon']->setMessage( 'maps-displaypoints-par-icon' ); $params['forceshow'] = new Parameter( 'forceshow', Parameter::TYPE_BOOLEAN, $smgQPForceShow, array( 'force show' ) ); $params['forceshow']->setMessage( 'semanticmaps-par-forceshow' ); $params['showtitle'] = new Parameter( 'showtitle', Parameter::TYPE_BOOLEAN, $smgQPShowTitle, array( 'show title' ) ); $params['showtitle']->setMessage( 'semanticmaps-par-showtitle' ); $params['template'] = new Parameter( 'template', Parameter::TYPE_STRING, $smgQPTemplate, array(), array( New CriterionNotEmpty() ) ); $params['template']->setDoManipulationOfDefault( false ); $params['template']->setMessage( 'semanticmaps-par-template' ); $params['title'] = new Parameter( 'title', Parameter::TYPE_STRING, $egMapsDefaultTitle ); $params['title']->setMessage( 'maps-displaypoints-par-title' ); $params['label'] = new Parameter( 'label', Parameter::TYPE_STRING, $egMapsDefaultLabel, array( 'text' ) ); $params['label']->setMessage( 'maps-displaypoints-par-label' ); return $params; }