PHP Classes
elePHPant
Icontem

File: examples/foundation5.php

Recommend this page to a friend!
  Classes of Yuriy Tkachenko  >  Simple Flash Messages  >  examples/foundation5.php  >  Download  
File: examples/foundation5.php
Role: Example script
Content type: text/plain
Description: Demo Foundation 5
Class: Simple Flash Messages
Display message with different CSS frameworks
Author: By
Last change: Added Bulma.io template
Date: 9 months ago
Size: 1,521 bytes
 

Contents

Class file image Download
<?php

use Tamtamchik\SimpleFlash\TemplateFactory;
use
Tamtamchik\SimpleFlash\Templates;

session_start();

require_once
__DIR__ . '/../vendor/autoload.php';

flash()->error(['Invalid email!', 'Invalid username!'])
    ->
warning('Warning message.')
    ->
info('Info message.')
    ->
success('Success message!');

flash()->setTemplate(TemplateFactory::create(Templates::FOUNDATION_5));

?>

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Test Foundation 5 template example.</title>
    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.3/css/foundation.min.css">
</head>
<body>

<a href="https://github.com/tamtamchik/simple-flash"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"></a>
<br/>

<div class="row" style="width: 600px;">

    <?php include_once '_menu.php'; ?>

    <hr/>

    <?= flash() ?>
</div>

<!-- Latest compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.3/js/foundation.min.js"></script>

</body>
</html>