-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPart.php
More file actions
64 lines (56 loc) · 1.75 KB
/
Part.php
File metadata and controls
64 lines (56 loc) · 1.75 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
declare(strict_types=1);
/**
* This file is part of the EaseTWBootstrap3 package
*
* https://github.com/VitexSoftware/php-ease-twbootstrap
*
* (c) Vítězslav Dvořák <http://vitexsoftware.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Ease\TWB;
class Part extends \Ease\Part
{
/**
* Vložení náležitostí pro twitter bootstrap.
*/
public function __construct()
{
parent::__construct();
self::twBootstrapize();
}
/**
* Opatří objekt vším potřebným pro funkci bootstrapu.
*/
public static function twBootstrapize()
{
parent::jQueryze();
\Ease\WebPage::singleton()->includeCSS(\Ease\WebPage::singleton()->bootstrapCSS);
\Ease\WebPage::singleton()->includeCSS(\Ease\WebPage::singleton()->bootstrapThemeCSS);
\Ease\WebPage::singleton()->includeJavaScript(\Ease\WebPage::singleton()->bootstrapJavaScript);
return true;
}
/**
* Vrací ikonu.
*
* @see http://getbootstrap.com/components/#glyphicons Přehled ikon
*
* @param string $code Kód ikony z přehledu
* @param array $properties Vlastnosti Tagu
*/
public static function glyphIcon($code, $properties = [])
{
if (null === $properties) {
$properties = ['class' => 'glyphicon glyphicon-'.$code];
} else {
if (isset($properties['class'])) {
$properties['class'] = 'glyphicon glyphicon-'.$code.' '.$properties['class'];
} else {
$properties['class'] = 'glyphicon glyphicon-'.$code;
}
}
return new \Ease\Html\Span(null, $properties);
}
}