2017 © Pedro Peláez
 

symfony-bundle maintenance-bundle

Maintenance bundle for Symfony 3.x 4.x

image

nuboxdevcom/maintenance-bundle

Maintenance bundle for Symfony 3.x 4.x

  • Wednesday, January 24, 2018
  • by slye44
  • Repository
  • 1 Watchers
  • 2 Stars
  • 35 Installations
  • CSS
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 46 % Grown

The README.md

MaintenanceBundle v2

SensioLabsInsight, (*1)

License Latest Stable Version, (*2)

Requirements

  • PHP >=7.1
  • symfony/framework-bundle >= 3.4 || ^4.0
  • Twig ^2.4

#, (*3)

:warning: Symfony before version 3.4 NOTICE

Please use ^1.x branch versions., (*4)

2.x versions is incompatible with versions lower than symfony 3.4, (*5)

#, (*6)

Installation:

Pretty simple with Composer, run:, (*7)

$ composer require nuboxdevcom/maintenance-bundle

#, (*8)

Simply Configuration

Enter your IPs here to allow you to access your site during a maintenance., (*9)

In config/ndc_maintenance.yaml, (*10)

ndc_maintenance:
    authorized_ips:
        - '127.0.0.1'
        - 'your.ip.domain.name.example'

#, (*11)

Configuration

Symfony Flex takes care of everything!, (*12)

#, (*13)

How to Use

In your template, add this to let you know if the site is in maintenance, (*14)

    {% if isMaintenanceMode() %}
        <p class="text-center bg-danger"><strong>Your site is in maintenance mode...</strong></p>
    {% endif %}

isMaintenanceMode() return boolean true or false., (*15)

If you want to activate maintenance mode, you will need to call the following method, (*16)

    $this->get('maintenance.service')->enableMaintenanceAction();

Or, (*17)

    $this->get('maintenance.service')->disableMaintenanceAction();

To disable maintenance mode., (*18)

If you want to know if maintenance is enabled from a controller, use this method, (*19)

    $this->get('maintenance.service')->isMaintenanceMode();

isMaintenanceMode() return boolean true or false., (*20)

#, (*21)

How to change the view of maintenance page

If you want to change the view, create a new view file, (*22)

    templates/bundles/NDCMaintenanceBundle/maintenance.html.twig

The Versions

24/01 2018

dev-master

9999999-dev https://github.com/nuboxdevcom/maintenance-bundle

Maintenance bundle for Symfony 3.x 4.x

  Sources   Download

MIT

The Requires

 

maintenance bundle symfony 3.3 nubox nuboxdevcom maintenance-bundle

24/01 2018
22/01 2018

1.0.2

1.0.2.0 https://github.com/nuboxdevcom/maintenance-bundle

Maintenance bundle for Symfony 3.x

  Sources   Download

MIT

The Requires

 

maintenance bundle symfony nubox nuboxdevcom maintenance-bundle

27/12 2017

1.0.1

1.0.1.0 https://github.com/nuboxdevcom/maintenance-bundle

Maintenance bundle for Symfony 3.4.x

  Sources   Download

MIT

The Requires

 

maintenance bundle symfony nubox nuboxdevcom maintenance-bundle

18/06 2017

1.0.0

1.0.0.0 https://github.com/nuboxdevcom/maintenance-bundle

Maintenance bundle for Symfony 3.3.x

  Sources   Download

MIT

The Requires

 

maintenance bundle symfony 3.3 nubox nuboxdevcom