PHPackages                             thenlabs/stratus-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. thenlabs/stratus-bundle

ActiveSymfony-bundle

thenlabs/stratus-bundle
=======================

StratusPHP integration for Symfony.

214PHP

Since Jul 24Pushed 4y agoCompare

[ Source](https://github.com/thenlabs/stratus-bundle)[ Packagist](https://packagist.org/packages/thenlabs/stratus-bundle)[ RSS](/packages/thenlabs-stratus-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

ThenLabsStratusBundle
=====================

[](#thenlabsstratusbundle)

Extends Symfony to the full stack development with integration of [StratusPHP](https://github.com/thenlabs/stratus-php).

**Notice: Like [StratusPHP](https://github.com/thenlabs/stratus-php), this project is also in development and should not be used in a real project yet.**

Installation.
-------------

[](#installation)

Install StratusPHP specifying the development version.

```
$ composer require thenlabs/stratus-php 1.0.x-dev

```

Install the maker bundle in case it isn't.

```
$ composer require symfony/maker-bundle --dev

```

Install this bundle:

```
$ composer require thenlabs/stratus-bundle dev-master

```

Usage.
------

[](#usage)

### Creating reactive pages.

[](#creating-reactive-pages)

Once the installation has finished we can create the application pages that will bring the integration with StratusPHP.

In order to create a new page run the next command:

```
$ php bin/console make:stratus-page main

```

In this case, "main" refers to the page name.

[![](1.png)](1.png)

As you can see, they was created three files, a template, a controller, and a class. You can review these files and edit it according to the project needs.

In the controller class you can fix the page route. By default will be like the page name, `/main` in this case.

The template file is empty by default but you should edit it with the page view.

In this example we will develop the [Example 2](https://thenlabs.org/es/doc/stratus-php/master/examples/2/example.html) of the StratusPHP docs.

```
{# templates/main-stratus-page.html.twig #}

{% extends 'base.html.twig' %}

{% block body %}

    Greet
{% endblock %}
```

> It’s very important highligh the `s-element` attribute and his value on key elements of the page view.

```
