AirLay backend

NodeController extends NodeController
in package

Class ApiBaseController.

Table of Contents

$config  : AirlayConfig
$config  : AirlayConfig
$request  : Request
$user  : UserEntity
$status  : StatusPage|null
$tokenHandler  : TokenHandler|null
__destruct()  : mixed
addTabToAllChildrenAction()  : string|false
Post add parent tab to all children.
afterExecuteRoute()  : mixed
beforeExecuteRoute()  : mixed
createNodeAction()  : string
createTreeAction()  : string
downloadLayerAction()  : void
getFeatureByIdAction()  : string
GET Get feature by id.
getFeaturesByIdsAction()  : string
POST || GET Get feature by ids.
getIconPreviewAction()  : string
getLayerBoundsAction()  : string
getLayerOptionsAction()  : string|false
GET Get layer options by id.
getObjsAction()  : string
request([ 'method' => 'GET', 'url' => 'api/v3/node/getObjs', 'params' => [ [ 'name' => 'layerId', 'type' => 'objectId', 'required' => true, 'description' => 'Layer id' ], [ 'name' => '_id', 'type' => 'objectId', 'required' => false 'description' => 'Layer object id' ], [ 'name' => 'lat1', 'type' => 'float', 'required' => false 'description' => 'Latitude of the upper-left corner, limit from -90 to 90', ], [ 'name' => 'lon1', 'type' => 'float', 'required' => false 'description' => 'Longitude of the upper-left corner, limit from -180 to 180' ], [ 'name' => 'lat2', 'type' => 'float', 'required' => false, 'description' => 'Latitude of the lower right corner, limit from -90 to 90' ], [ 'name' => 'lon2', 'type' => 'float', 'required' => false, 'description' => 'Longitude of the lower right corner, limit from -180 to 180' ], [ 'name' => 'skip', 'type' => 'absint', 'required' => false, 'description' => 'Number of objects to skip' ], [ 'name' => 'limit', 'type' => 'absint', 'required' => false, 'description' => 'The restriction of the retrieved objects' ], [ 'name' => 'properties', 'type' => 'absint', 'required' => false, 'description' => 'Enable object properties in the result, 1 - enable, 0 - disable', 'values' => [0, 1] ], [ 'name' => 'filter', 'type' => 'string', 'required' => false, 'description' => 'Filter by objects properties, see the link' ], [ 'name' => 'zoom', 'type' => 'int', 'required' => false, 'description' => 'The restriction of zoom option' ], ] ]) response([ 'status' => 200, 'message' = GeoJson, 'code' => 0 ])
getObjsInfoByIdAction()  : string
getParentTabsAction()  : string|false
GET Get parent tabs or buttons by child id.
indexAction()  : mixed
initialize()  : void
removeNodeAction()  : string
replaceDataSetInTreeAction()  : string|false
Post replace layers dataSet in tree to new one.
updateLayerOptionsAction()  : string
updateNodeNameAction()  : string
attachTmpFile()  : Response
extractNode()  : MenuNodeEntity
extractPortal()  : PortalEntity
firesAnRelationUpdateEvents()  : void
getId()  : mixed
getNormalizedUserId()  : int|ObjectId
getTranslator()  : NativeArray
getUserInfo()  : UserEntity
secureData()  : mixed
sendEmail()  : mixed
getMainTabIds()  : array<string|int, mixed>
getParentTabs()  : array<string|int, mixed>
sendToUpdateIconQueue()  : mixed

Properties

Methods

addTabToAllChildrenAction()

Post add parent tab to all children.

public addTabToAllChildrenAction() : string|false

request([ 'method' => 'Post', 'url' => '/api/v4/node/addTabToAllChildren' 'params' => [ [ 'name' => 'id', 'type' => 'ObjectId', 'required' => 'true', 'description' => nodeId ], [ 'name' => 'tab', 'type' => 'array', 'required' => 'true', 'description' => tab json ] ]) response( '200' => [ 'status' => 200, 'message' => ok, 'code' => 0 ] )

Tags
throws
AirlayException
Return values
string|false

afterExecuteRoute()

public afterExecuteRoute(Dispatcher $dispatcher) : mixed
Parameters
$dispatcher : Dispatcher
Return values
mixed

beforeExecuteRoute()

public beforeExecuteRoute(Dispatcher $dispatcher) : mixed
Parameters
$dispatcher : Dispatcher
Return values
mixed

getFeatureByIdAction()

GET Get feature by id.

public getFeatureByIdAction() : string

request([ 'method' => 'GET', 'url' => '/api/v4/node/getFeatureById' 'params' => [ [ 'name' => 'layerId', 'type' => 'ObjectId', 'required' => 'true' ], [ 'name' => 'featureId', 'type' => 'ObjectId', 'required' => 'true' ] ]) response( '200' => [ 'status' => 200, 'message' => FeatureEntity, 'code' => 0 ] )

Tags
throws
AirlayException
Return values
string

getFeaturesByIdsAction()

POST || GET Get feature by ids.

public getFeaturesByIdsAction() : string

request([ 'method' => 'POST || GET', 'url' => '/api/v4/node/getFeaturesByIds' 'params' => [ [ 'name' => 'data', 'type' => 'json', 'required' => 'true' ] ]) response( '200' => [ 'status' => 200, 'message' => [ [ 'layerId' => 'string', 'features' => FeatureEntity[] ] ], 'code' => 0 ] )

Tags
throws
AirlayException
Return values
string

getLayerOptionsAction()

GET Get layer options by id.

public getLayerOptionsAction() : string|false

request([ 'method' => 'GET', 'url' => '/api/v4/node/getLayerOptions' 'params' => [ [ 'name' => 'id', 'type' => 'ObjectId', 'required' => 'true' ] ]) response( '200' => [ 'status' => 200, 'message' => array, 'code' => 0 ] )

Tags
throws
AirlayException
Return values
string|false

getObjsAction()

request([ 'method' => 'GET', 'url' => 'api/v3/node/getObjs', 'params' => [ [ 'name' => 'layerId', 'type' => 'objectId', 'required' => true, 'description' => 'Layer id' ], [ 'name' => '_id', 'type' => 'objectId', 'required' => false 'description' => 'Layer object id' ], [ 'name' => 'lat1', 'type' => 'float', 'required' => false 'description' => 'Latitude of the upper-left corner, limit from -90 to 90', ], [ 'name' => 'lon1', 'type' => 'float', 'required' => false 'description' => 'Longitude of the upper-left corner, limit from -180 to 180' ], [ 'name' => 'lat2', 'type' => 'float', 'required' => false, 'description' => 'Latitude of the lower right corner, limit from -90 to 90' ], [ 'name' => 'lon2', 'type' => 'float', 'required' => false, 'description' => 'Longitude of the lower right corner, limit from -180 to 180' ], [ 'name' => 'skip', 'type' => 'absint', 'required' => false, 'description' => 'Number of objects to skip' ], [ 'name' => 'limit', 'type' => 'absint', 'required' => false, 'description' => 'The restriction of the retrieved objects' ], [ 'name' => 'properties', 'type' => 'absint', 'required' => false, 'description' => 'Enable object properties in the result, 1 - enable, 0 - disable', 'values' => [0, 1] ], [ 'name' => 'filter', 'type' => 'string', 'required' => false, 'description' => 'Filter by objects properties, see the link' ], [ 'name' => 'zoom', 'type' => 'int', 'required' => false, 'description' => 'The restriction of zoom option' ], ] ]) response([ 'status' => 200, 'message' = GeoJson, 'code' => 0 ])

public getObjsAction() : string
Tags
link
https://navikey.ru/wiki/doku.php?id=ru:dsp:airlay:layer#%D1%84%D0%B8%D0%BB%D1%8C%D1%82%D1%80_%D1%81%D1%82%D1%80%D0%BE%D1%87%D0%BD%D1%8B%D0%B9
throws
AirlayException
Return values
string

getObjsInfoByIdAction()

public getObjsInfoByIdAction() : string
Return values
string

getParentTabsAction()

GET Get parent tabs or buttons by child id.

public getParentTabsAction() : string|false

request([ 'method' => 'GET', 'url' => '/api/v4/node/getParentTabs' 'params' => [ [ 'name' => 'id', 'type' => 'ObjectId', 'required' => 'true', 'description' => nodeId ], [ 'name' => 'type', 'type' => 'string', 'required' => 'true', 'values' => 'tabs'|'buttons' 'description' => (type of tabs) ] ]) response( '200' => [ 'status' => 200, 'message' => array, 'code' => 0 ] )

Tags
throws
AirlayException
Return values
string|false

replaceDataSetInTreeAction()

Post replace layers dataSet in tree to new one.

public replaceDataSetInTreeAction() : string|false

request([ 'method' => 'Post', 'url' => '/api/v4/node/replaceDataSetInTree' 'params' => [ [ 'name' => 'treeId', 'type' => 'ObjectId', 'required' => 'true', ], [ 'name' => 'oldDataSetId', 'type' => 'ObjectId', 'required' => 'true', ], [ 'name' => 'newDataSetId', 'type' => 'ObjectId', 'required' => 'true' ] ]) response( '200' => [ 'status' => 200, 'message' => ok, 'code' => 0 ] )

Tags
throws
AirlayException
Return values
string|false

extractNode()

protected extractNode(ObjectId|null $id, ObjectId $userId[, array<string|int, string>|null $availableTypes = null ]) : MenuNodeEntity
Parameters
$id : ObjectId|null
$userId : ObjectId
$availableTypes : array<string|int, string>|null = null
Tags
throws
AirlayException
Return values
MenuNodeEntity

firesAnRelationUpdateEvents()

protected firesAnRelationUpdateEvents(array<string|int, mixed> $relations, ObjectId $dataSetId[, DataSetLogEntity|null $log = null ]) : void
Parameters
$relations : array<string|int, mixed>
$dataSetId : ObjectId
$log : DataSetLogEntity|null = null
Return values
void

getTranslator()

protected getTranslator([string|null $language = null ]) : NativeArray
Parameters
$language : string|null = null
Tags
throws
Exception
Return values
NativeArray

secureData()

protected secureData(mixed $data) : mixed
Parameters
$data : mixed
Return values
mixed

sendEmail()

protected sendEmail(string $email, string $name, string $subject, string $body) : mixed
Parameters
$email : string
$name : string
$subject : string
$body : string
Return values
mixed

getMainTabIds()

private getMainTabIds(array<string|int, mixed> $tabs) : array<string|int, mixed>
Parameters
$tabs : array<string|int, mixed>
Return values
array<string|int, mixed>

getParentTabs()

private getParentTabs(array<string|int, mixed> $node, string $type) : array<string|int, mixed>
Parameters
$node : array<string|int, mixed>
$type : string
Tags
throws
AirlayException
Return values
array<string|int, mixed>

sendToUpdateIconQueue()

private sendToUpdateIconQueue(ObjectId $nodeId) : mixed
Parameters
$nodeId : ObjectId
Return values
mixed

Search results