kadekjayak/semantic-ui

There is no license information available for the latest version (0.2) of this package.

SemanticUI plugin for CakePHP

Installs: 99

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:cakephp-plugin

0.2 2016-08-11 04:55 UTC

This package is not auto-updated.

Last update: 2024-09-28 18:58:47 UTC


README

This is Semantic UI plugin for CakePhp, it contain Theme for Bake, modified component and Helper.

Installation

Install using composer

composer require kadekjayak/semantic-ui

or Download and extract it into plugin directory on cakephp.

after that you need to load the plugin manually by adding it into Bootstrap.php

Plugin::load('SemanticUI', ['bootstrap' => false, 'routes' => true]);

##Requirements

  • CakePHP 3+

Example

Using Theme for Bake

you can bake with Semantic UI theme by using --theme options, you can use the command below on terminal

/bin/cake bake template all --theme SemanticUI

and use the layout that included from plugin, for example change on your src/Controller/AppController.php. (actualy i didn't know if it's the correct way)

public function beforeRender(Event $event)
{
    $this->viewBuilder()->layout('SemanticUI.semantic');
    if (!array_key_exists('_serialize', $this->viewVars) &&
        in_array($this->response->type(), ['application/json', 'application/xml'])
    ) {
        $this->set('_serialize', true);
    }
}

to get the Input form Styled you should use Form Helper on this plugin, you can use Form helper on this plugin by passing className options when loading FormHelper on your src/View/AppView.php

public function initialize()
{
    $this->loadHelper('Form', ['className' => 'SemanticUI.SemanticForm']);
    $this->loadHelper('Paginator', ['className' => 'SemanticUI.SemanticPaginator']);
    $this->loadHelper('Html', ['className' => 'SemanticUI.SemanticHtml']);
}

##Notes For more info about Semantic UI visit their official website on : http://semantic-ui.com/