2017 © Pedro Peláez
 

library bootstrap-alerts

Bootstrap alerts

image

palmtree/bootstrap-alerts

Bootstrap alerts

  • Sunday, July 22, 2018
  • by palmtree
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Palmtree Bootstrap Alerts

License, (*1)

Bootstrap alert manager for PHP projects., (*2)

Add and display bootstrap alerts with relevant Font Awesome icons, (*3)

Requirements

  • PHP >= 8.1

Installation

Use composer to add the package to your dependencies:, (*4)

composer require palmtree/bootstrap-alerts

Usage

Echoing the AlertManager class will invoke __toString() on each alert and return a concatenated string of HTML., (*5)

<?php
$alertManager = new \Palmtree\BootstrapAlerts\AlertManager();

$alertManager->addSuccess('It worked!');
$alertManager->addInfo('Did you know?');
$alertManager->addWarning('Make sure you did it right');
$alertManager->addError('Something went wrong!');

echo $alertManager;

You can also filter alerts:, (*6)

<?php
$alertManager = new \Palmtree\BootstrapAlerts\AlertManager();

$alertManager->addWarning('Make sure you did it right');
$alertManager->addError('Something went wrong!');
$alertManager->addError('Another thing went wrong!');

foreach($alertManager->getAlerts('error') as $errorAlert) {
    echo $errorAlert;
}

License

Released under the MIT license, (*7)

The Versions

22/07 2018

dev-master

9999999-dev

Bootstrap alerts

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

bootstrap alerts

22/07 2018

v0.1.0

0.1.0.0

Bootstrap alerts

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

bootstrap alerts