Skip to content

How to set up Satellite

siramsay edited this page Aug 31, 2021 · 28 revisions

To get started in setting up a satellite you can download the sample Asteroid Satellite from the Github repository.

The Asteroid Perihelion Satellite example can be found here: https://github.com/chishiki/perihelion-satellite.

You can download and modify the satellite or build it from scratch. Following is what comes in the satellite example with notes on what each file does. You may not need everything and you can also add your own PHP to the module.

What comes with the Perihelion Satellite?

/perihelion-satellite

The root of the perihelion satellite comes with the following files:
.gitignore
composer.json
README.md

/php

module.php The module.php loads all the models, views, and controllers. You need to change the path to match your module directory name.

/Model

final class Asteroid extends ORM {

  • For insert, update, and delete use the ORM class. See Perihelion ORM for more information.
  • For select there is an example _List class AsteroidList.

/View

2 view examples are supplied.

/Controller There are 8 controllers in the example satellite. However, we only need to concern ourselves with the 4 listed below. The other 4 are helpers.

_satellite.state.controller.php
_satellite.view.controller.php
asteroid.controller.php
asteroid.view.controller.php

/data

In the data folder, you will find the schema and sample data.
There is also a language data file and a changelog file.

/assets

/css
In the CSS directory, you will find a starter file with breakpoints to add your satellite specific CSS.
/files
An empty directory to add your satellite specific static files.
/images
An empty directory to add your satellite specific static images.
/js
The JS file has a JS helper function to deal with bilingual URLs.