本文整理汇总了PHP中helpers\Assets类的典型用法代码示例。如果您正苦于以下问题:PHP Assets类的具体用法?PHP Assets怎么用?PHP Assets使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Assets类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Construct
*
* @param Config $config
* @param Router $router
* @param View $view
*/
public function __construct(Config $config, Router $router, View $view)
{
$this->config = $config;
$this->router = $router;
$this->view = $view;
Assets::setRouter($this->router);
}
示例2: executeFunction
public function executeFunction($link, $type)
{
switch ($type) {
case 'js':
Assets::js([$link]);
break;
case 'css':
Assets::css([$link]);
break;
}
}
示例3: beforeMethod
public function beforeMethod()
{
$this->mUsers = new mUsers();
$this->auth = new Auth($this->mUsers, $this->config);
if (Dragon::$method != 'login' && !$this->auth->check()) {
$this->router->redirect($this->config->get('project_host'));
}
parent::beforeMethod();
$this->view->setLayout('default');
Assets::add('main', Assets::TYPE_CSS);
Assets::add('default', Assets::TYPE_JS);
}
示例4: orgChartEmplTree
private function orgChartEmplTree($array, $parent = 0)
{
$tree .= "<ul class=\"root\">";
foreach ($array as $row) {
if (!empty($row->dep)) {
$dep = 'dep';
} else {
$dep = '';
}
if ($row->manager_id == $parent) {
$tree .= "<li><a id=\"user-" . $row->id . "\" href=\"#user-" . $row->id . "\"><span class=\"image\"><img src=\"" . Assets::avatar($row->id) . "\" widht=\"60\" height=\"60\"></span><span class=\"name\">" . $row->name . "<span data-placement=\"top\" data-popup=\"tooltip\" title=\"" . $row->dep . "\" class=\"" . $dep . "\" style=\"background-color: " . $row->color . "\"></span></span><span class=\"title\">" . $row->title . "</span></a>";
$tree .= $this->orgChartEmplTree($array, $row->id);
# recurse
$tree .= "</li>";
}
}
$tree .= "</ul>";
return $tree;
}
示例5: index
/**
* Homepage -- default method
*/
public function index()
{
Debug::timer('test');
Assets::add('main', Assets::TYPE_CSS);
Assets::add('default', Assets::TYPE_JS);
/*
* Sample information about access to database data
* Default read:
*/
// $modelSample = new mSample();
// $rows = $modelSample->get();
// Debug::var_dump($rows);
// $modelSample->get(2);
/*
* Sample get instance of component
*/
$componentEmail = new cEmail($this->config, $this->router);
Debug::var_dump('test');
Debug::var_dump([432, 654]);
Debug::timer('test');
$this->set('variable', 'how to set variable to view');
$this->set('links', array('produkt' => $this->router->getUrl('products', 'detail', 123, array('list' => 5))));
}
示例6:
?>
Zeilschool de Waai.<br>
Alle rechten voorbehouden.<br />
<a href="developers">Developerteam</a>
</div>
<div class="col-md-4">
<h2>Contact opnemen</h2><hr>
<p>Zeilschool de Waai<br>Ymedaem 45<br>8722 GR Warns<br>Telefoon: 0514 561290<br>Email: info@zs-waai.nl<br><br>
Heeft u vragen of opmerkingen? <a href="contact">Klik hier.</a></p>
</div>
</div>
</div>
<!-- JS -->
<?php
Assets::js(array(Url::templatePath() . 'js/jquery.js', 'https://www.google.com/recaptcha/api.js', '//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js', Url::templatePath() . 'js/script.js', Url::templatePath() . 'js/cursistkoppelen.js', Url::templatePath() . 'js/validation.js'));
//hook for plugging in javascript
$hooks->run('js');
//hook for plugging in code into the footer
$hooks->run('footer');
?>
</body>
</html>
示例7:
<?php
/**
* Sample layout
*/
use Helpers\Assets;
use Helpers\Url;
use Helpers\Hooks;
//initialise hooks
$hooks = Hooks::get();
?>
</div>
<!-- JS -->
<?php
Assets::js(array('/app/templates/default/js/jquery.js', '/app/templates/default/js/bootstrap.min.js', '/app/templates/default/js/scrollingSidebar.js'));
//hook for plugging in javascript
$hooks->run('js');
//hook for plugging in code into the footer
$hooks->run('footer');
?>
</body>
</html>
示例8:
<span>Jazz</span>
</a>
</li>
</ul>
</nav>
<!-- / nav -->
</div>
</section>
<!-- <footer class="footer hidden-xs no-padder text-center-nav-xs">
<div class="bg hidden-xs ">
<div class="dropdown dropup wrapper-sm clearfix">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<span class="thumb-sm avatar pull-left m-l-xs">
<?php
echo Assets::image('images/a3.png', 'dker', '');
?>
<i class="on b-black"></i>
</span>
<span class="hidden-nav-xs clear">
<span class="block m-l">
<strong class="font-bold text-lt">John.Smith</strong>
<b class="caret"></b>
</span>
<span class="text-muted text-xs block m-l">Art Director</span>
</span>
</a>
<ul class="dropdown-menu animated fadeInRight aside text-left">
<li>
<span class="arrow bottom hidden-nav-xs"></span>
<a href="#">Settings</a>
示例9:
<div class="controls">
<textarea class="input-xlarge" name="description" id="textarea2" rows="8"><?php
echo $album_data->album_description;
?>
</textarea>
</div>
</div>
<div class="control-group">
<label class="control-label">Cover Photo</label>
<div class="controls">
<input type="file" name="image">
</div>
<div class="controls">
<?php
echo Assets::image($album_data->album_image, '', 'width: 120px');
?>
</div>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-primary">Save</button>
<button type="reset" class="btn">Cancel</button>
</div>
</fieldset>
</form>
</div>
</div><!--/span-->
</div><!--/row-->
</div><!--/.fluid-container-->
示例10:
?>
<title><?php
echo $data['title'] . ' - ' . SITETITLE;
//SITETITLE defined in app/Core/Config.php
?>
</title>
<!-- CSS -->
<?php
Assets::css(array(Url::templatePath() . 'css/bootstrap.min.css', Url::templatePath() . 'css/londinium-theme.css', Url::templatePath() . 'css/icons.css', Url::templatePath() . 'css/styles.css', Url::templatePath() . 'css/video-js.css', 'http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=latin,cyrillic-ext'));
//hook for plugging in css
$hooks->run('css');
?>
<!-- JS -->
<?php
Assets::js(array('http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js', Url::templatePath() . 'js/plugins/charts/sparkline.min.js', Url::templatePath() . 'js/plugins/forms/uniform.min.js', Url::templatePath() . 'js/plugins/forms/select2.min.js', Url::templatePath() . 'js/plugins/forms/inputmask.js', Url::templatePath() . 'js/plugins/forms/autosize.js', Url::templatePath() . 'js/plugins/forms/inputlimit.min.js', Url::templatePath() . 'js/plugins/forms/listbox.js', Url::templatePath() . 'js/plugins/forms/multiselect.js', Url::templatePath() . 'js/plugins/forms/validate.min.js', Url::templatePath() . 'js/plugins/forms/tags.min.js', Url::templatePath() . 'js/plugins/forms/switch.min.js', Url::templatePath() . 'js/plugins/forms/uploader/plupload.full.min.js', Url::templatePath() . 'js/plugins/forms/uploader/plupload.queue.min.js', Url::templatePath() . 'js/plugins/forms/wysihtml5/wysihtml5.min.js', Url::templatePath() . 'js/plugins/forms/wysihtml5/toolbar.js', Url::templatePath() . 'js/plugins/interface/daterangepicker.js', Url::templatePath() . 'js/plugins/interface/fancybox.min.js', Url::templatePath() . 'js/plugins/interface/moment.js', Url::templatePath() . 'js/plugins/interface/jgrowl.min.js', Url::templatePath() . 'js/plugins/interface/datatables.min.js', Url::templatePath() . 'js/plugins/interface/colorpicker.js', Url::templatePath() . 'js/plugins/interface/fullcalendar.min.js', Url::templatePath() . 'js/plugins/interface/timepicker.min.js', Url::templatePath() . 'js/bootstrap.min.js', Url::templatePath() . 'js/video.js', Url::templatePath() . 'js/application.js'));
//hook for plugging in javascript
$hooks->run('js');
?>
<script>
videojs.options.flash.swf = "<?php
echo Url::templatePath() . 'swf/video-js.swf';
?>
";
</script>
</head>
<body>
<!-- Login wrapper -->
<div class="login-wrapper">
<form action="<?php
示例11:
<?php
//hook for plugging in meta tags
$hooks->run('meta');
?>
<title><?php
echo $data['title'] . ' - ' . SITETITLE;
//SITETITLE defined in app/Core/Config.php
?>
</title>
<meta name="description" content="<?php
echo $data['meta_description'];
?>
">
<!-- CSS -->
<?php
Assets::css(array('//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css', Url::templatePath() . 'css/style.css'));
//hook for plugging in css
$hooks->run('css');
?>
<link rel="shortcut icon" href="assets/ico/favicon.ico">
</head>
<body>
<!-- Fixed navbar -->
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
示例12:
<?php
use Helpers\Assets;
use Helpers\Url;
use Helpers\Hooks;
//initialise hooks
$hooks = Hooks::get();
?>
<?php
Assets::js(array(Url::templatePath() . 'js/jquery.min.js', Url::templatePath() . 'js/particles.min.js', Url::templatePath() . 'js/bootstrap.min.js', Url::templatePath() . 'js/jquery.bootstrap-autohidingnavbar.min.js', Url::templatePath() . 'js/material.min.js', Url::templatePath() . 'js/ripples.min.js', Url::templatePath() . 'js/app.js'));
//hook for plugging in javascript
$hooks->run('js');
//hook for plugging in code into the footer
$hooks->run('footer');
?>
<br><br><br>
</div> <!-- main container -->
<footer class="footer">
<div class="row">
<div class="col-md-10 col-md-offset-1">
<div class="text-center">
<div class="text-lg-bn-white sliding-lg-white">Vamos a trabajar juntos.</div>
<br><br>
<div class="text-md-white">¿Tienes algún proyecto en mente?</div>
<br>
<div class="text-md-white">Empecemos a desarrollarlo.</div>
<br><br>
<div class="row">
<div class="col-md-4 text-right">
<a class="btn btn-raised btn-default" href="<?php
示例13:
<head>
<!-- Site meta -->
<meta charset="utf-8">
<?php
//hook for plugging in meta tags
$hooks->run('meta');
?>
<title><?php
echo $data['title'] . ' - ' . SITETITLE;
//SITETITLE defined in app/Core/Config.php
?>
</title>
<!-- CSS -->
<?php
$theroute = DIR . 'app/Modules/Search/templates/search/';
Assets::css(array($theroute . 'css/ajaxlivesearch.min.css', $theroute . 'css/fontello.css', $theroute . 'css/animation.css', $theroute . 'font/fontello.woff'));
//hook for plugging in css
$hooks->run('css');
?>
</head>
<body>
<?php
//hook for running code after body tag
$hooks->run('afterBody');
?>
<div class="container">
示例14:
<?php
use Helpers\Assets;
use Helpers\Url;
use Helpers\Hooks;
//initialise hooks
$hooks = Hooks::get();
?>
</div>
<!-- JS -->
<?php
Assets::js(array('//code.jquery.com/jquery-1.11.3.min.js', '//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js', '//code.jquery.com/ui/1.11.2/jquery-ui.js', Url::templatePath() . 'js/plugins/metisMenu/jquery.metisMenu.js', Url::templatePath() . 'js/inspinia.js', Url::templatePath() . 'js/plugins/pace/pace.min.js', Url::templatePath() . 'js/plugins/fullcalendar/fullcalendar.min.js', Url::templatePath() . 'js/custom.js'));
//hook for plugging in javascript
$hooks->run('js');
//hook for plugging in code into the footer
$hooks->run('footer');
?>
</body>
</html>
示例15: foreach
<!-- Timeline -->
<div class="timeline timeline-left content-group">
<div class="timeline-container">
<?php
foreach ($data['posts'] as $row) {
?>
<!-- Post -->
<div class="timeline-row">
<div class="timeline-icon">
<a href="#"><img data-popup="tooltip" data-placement="bottom" title="<?php
echo $row->name;
?>
" src="<?php
echo Assets::avatar($row->user_id);
?>
" alt=""></a>
</div>
<div class="panel panel-flat timeline-content">
<div class="panel-heading">
<h3 class="panel-title">
<?php
echo $row->title;
?>
</h3>
<div class="heading-elements">
<span class="heading-text"><time data-date-published="<?php
echo Date::showDateTime($row->published_at, 'local', 'local');
?>