Giter Club home page Giter Club logo

bootstrap-3-ui's Introduction

Bootstrap 3 UI

Transparently use Bootstrap 3 with CakePHP 3.

Allow usage of bootstrap 3 and 4 in the same project

This repository is in sync with FriendsOfCake/bootstrap-ui 1.x releases and uses another namespace to allow installation of this package for bootstrap 3 and FriendsOfCake/bootstrap-ui 2.x for bootstrap 4 in the same project.

composer require jorisvaesen/bootstrap-3-ui
composer require friendsofcake/bootstrap-ui:2.0.0-beta4

Usage

The easiest way to use bootstrap 3 and 4 in your CakePHP project is to create an extra AppView for bootstrap 4.

Edit your current AppView.php to start using this package:

// AppView.php

use Bootstrap3UI\View\UIViewTrait;

class AppView extends View
{
    use UIViewTrait;
    
    public function initialize()
    {
    	parent::initialize();
        
        $this->initializeUI();
    }

Create an AppView for pages which use bootstrap 4:

// AppView4.php

use BootstrapUI\View\UIViewTrait;

class AppView4 extends View
{
    use UIViewTrait;
    
    public function initialize()
    {
    	parent::initialize();
        
        $this->initializeUI();
    }

Load bootstrap 3 or bootstrap 4 helpers through the AppView:

// In any controller initialize() or any action
$this->viewBuilder()
    ->setClassName('App\View\AppView')      // Bootstrap 3
    ->setClassName('App\View\AppView4')     // Bootstrap 4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.