This repository was archived by the owner on Dec 10, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlugin.php
More file actions
43 lines (41 loc) · 1.37 KB
/
Plugin.php
File metadata and controls
43 lines (41 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
namespace PHPoole;
use PHPoole\Utils;
/**
* PHPoole plugin TwBootstrap
*/
Class TwBootstrap extends Plugin
{
public function preInit($e)
{
$phpoole = $e->getTarget();
$phpoole->addMessage('TwBootstrap plugin available');
}
public function postInit($e)
{
$phpoole = $e->getTarget();
$componentsDir = realpath(__DIR__ . '/../../components');
// bootstrap
// css
copy(
$componentsDir . '/bootstrap/css/bootstrap.min.css',
$phpoole->getWebsitePath() . '/' . PHPoole::PHPOOLE_DIRNAME . '/' . PHPoole::ASSETS_DIRNAME . '/css/bootstrap.min.css'
);
// fonts
Utils\RecursiveCopy(
$componentsDir . '/bootstrap/fonts',
$phpoole->getWebsitePath() . '/' . PHPoole::PHPOOLE_DIRNAME . '/' . PHPoole::ASSETS_DIRNAME . '/fonts'
);
// js
copy(
$componentsDir . '/bootstrap/js/bootstrap.min.js',
$phpoole->getWebsitePath() . '/' . PHPoole::PHPOOLE_DIRNAME . '/' . PHPoole::ASSETS_DIRNAME . '/js/bootstrap.min.js'
);
// jquery
copy(
$componentsDir . '/jquery/jquery.min.js',
$phpoole->getWebsitePath() . '/' . PHPoole::PHPOOLE_DIRNAME . '/' . PHPoole::ASSETS_DIRNAME . '/js/jquery.min.js'
);
$phpoole->addMessage('Twitter Bootstrap assets copied');
}
}