2017 © Pedro Peláez
 

library bs3

PHP Bootstrap 3 Helper

image

phpbs/bs3

PHP Bootstrap 3 Helper

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

PHP Bootstrap 3 Helper

Total Downloads Latest Stable Version, (*1)

Installation

Install the latest version with composer, (*2)

composer require phpbs/bs3

or just include/require the src/bs3_helper.php file in your code., (*3)

Basic Example

<?= table(
    ['ID', 'Title', 'Actions'],
    [
        [1, 'Post 1', btn(icon('pencil'), ['sm'], ['href' => '/posts/1/edit']) . btn_danger(icon('times'))],
        [2, 'Post 2', btn(icon('pencil'), ['sm'], ['href' => '/posts/2/edit']) . btn_danger(icon('times'))]
    ],
    ['bordered', 'hover', 'striped'],
    [pagination(2, 20) => ['colspan' => 3, 'class' => 'text-center']],
    ['id' => 'posts-table']
) ?>
<table class="table table-bordered table-hover table-striped" id="posts-table">
    <thead>
        <tr>
            <th>ID</th>
            <th>Title</th>
            <th>Action</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>1</td>
            <td>Post 1</td>
            <td>
                <a class="btn btn-default btn-sm" href="/posts/1/edit">
                    <i class="glyphicon glyphicon-pecil"></i>
                </a>
                <button class="btn btn-danger" type="button">
                    <i class="glyphicon glyphicon-times"></i>
                </button>
            </td>
        </tr>
        <tr>
            <td>2</td>
            <td>Post 2</td>
            <td>
                <a class="btn btn-default btn-sm" href="/posts/2/edit">
                    <i class="glyphicon glyphicon-pecil"></i>
                </a>
                <button class="btn btn-danger" type="button">
                    <i class="glyphicon glyphicon-times"></i>
                </button>
            </td>
        </tr>
    </tbody>
    <tfoot>
        <tr>
            <td class="text-center" colspan="3">
                <ul class="pagination">
                    <li class="active"><a>1</a></li>
                    <li><a href="/posts?page=2">2</a></li>
                    <li><a href="/posts?page=3">3</a></li>
                    <li><a href="/posts?page=4">4</a></li>
                    <li><a href="/posts?page=2"><span aria-hidden="true">&raquo;</span></a></li>
                    <li><a href="/posts?page=10">Last</a></li>
                </ul>
            </td>
        </tr>
    </tfoot>
</table>

* HTML output will not be indented., (*4)

About

Requirements

  • PHP Bootstrap 3 Helper works with PHP 5.3+.

Submitting bugs and feature requests

Bugs and feature request are tracked on GitHub., (*5)

Author

Natan Felles - natanfelles@gmail.com - https://natanfelles.github.io, (*6)

See also the list of contributors which participated in this project., (*7)

License

PHP Bootstrap 3 Helper is licensed under the MIT License - see the LICENSE file for details., (*8)

The Versions

21/10 2017

dev-master

9999999-dev https://github.com/phpbs/bs3

PHP Bootstrap 3 Helper

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

bootstrap helper

21/10 2017

v0.0.2

0.0.2.0 https://github.com/phpbs/bs3

PHP Bootstrap 3 Helper

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

bootstrap helper

21/10 2017

v0.0.1

0.0.1.0 https://github.com/phpbs/bs3

PHP Bootstrap 3 Helper

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

bootstrap helper